home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / Information / CSMP Digest / volume 3 / csmp-digest-v3-001 < prev    next >
Encoding:
Text File  |  1995-06-07  |  89.1 KB  |  2,304 lines  |  [TEXT/R*ch]

  1. Received-Date: Thu, 10 Mar 1994 19:07:16 +0100
  2. From: pottier@clipper.ens.fr (Francois Pottier)
  3. Subject: CSMP Digest, Issue 1
  4. To: csmp-digest@ens.fr
  5. Date: Thu, 10 Mar 94 19:07:11 MET
  6. X-Mailer: ELM [version 2.3 PL11]
  7. Errors-To: listman@ens.fr
  8. Reply-To: pottier@clipper.ens.fr
  9. X-Sequence: 2
  10.  
  11. C.S.M.P. Digest             Thu, 10 Mar 94       Volume 3 : Issue 1
  12.  
  13. Today's Topics:
  14.  
  15.         Async PBRead in a VBL
  16.         C compilers for the MAC - Summary
  17.         Fortran compilers for the Mac
  18.         Getting time zone settings from Map control panel
  19.         Grow-box icon drawn w-o scroll lines
  20.         How to get all fonts ?
  21.         Interacting with a POP Server
  22.         Interrupting an interrupt
  23.         Partial pathnames in FSMake
  24.         PowerPC & CFM query
  25.         Rules for Using This Newsgroup???
  26.         Sending Apple Events from Excel
  27.         Strange launch erroor
  28.         TCL- CDLOGDialog [?]
  29.         Time Manager
  30.         Tip for Think C and Radius monitor users
  31.         Universal Headers (A)
  32.         c source code for simple-classic-old mac arcade type games wanted
  33.         showtext-pascal
  34.  
  35.  
  36.  
  37. The Comp.Sys.Mac.Programmer Digest is moderated by Francois Pottier
  38. (pottier@clipper.ens.fr).
  39.  
  40. The digest is a collection of article threads from the internet newsgroup
  41. comp.sys.mac.programmer.  It is designed for people who read c.s.m.p. semi-
  42. regularly and want an archive of the discussions.  If you don't know what a
  43. newsgroup is, you probably don't have access to it.  Ask your systems
  44. administrator(s) for details.  If you don't have access to news, you may
  45. still be able to post messages to the group by using a mail server like
  46. anon.penet.fi (mail help@anon.penet.fi for more information).
  47.  
  48. Each issue of the digest contains one or more sets of articles (called
  49. threads), with each set corresponding to a 'discussion' of a particular
  50. subject.  The articles are not edited; all articles included in this digest
  51. are in their original posted form (as received by our news server at
  52. nef.ens.fr).  Article threads are not added to the digest until the last
  53. article added to the thread is at least two weeks old (this is to ensure that
  54. the thread is dead before adding it to the digest).  Article threads that
  55. consist of only one message are generally not included in the digest.
  56.  
  57. The digest is officially distributed by two means, by email and ftp.
  58.  
  59. If you want to receive the digest by mail, send email to listserv@ens.fr
  60. with no subject and one of the following commands as body:
  61.     help                        Sends you a summary of commands
  62.     subscribe csmp-digest Your Name    Adds you to the mailing list
  63.     signoff csmp-digest            Removes you from the list
  64. Once you have subscribed, you will automatically receive each new
  65. issue as it is created.
  66.  
  67. The official ftp info is //ftp.dartmouth.edu/pub/csmp-digest.
  68. Questions related to the ftp site should be directed to
  69. scott.silver@dartmouth.edu. Currently no previous volumes of the CSMP
  70. digest are available there.
  71.  
  72. Also, the digests are available to WAIS users as comp.sys.mac.programmer.src.
  73.  
  74.  
  75. -------------------------------------------------------
  76.  
  77. >From mxmora@unix.sri.com (Matt Mora)
  78. Subject: Async PBRead in a VBL
  79. Date: 23 Feb 1994 09:53:24 -0800
  80. Organization: SRI International, Menlo Park, CA
  81.  
  82.  
  83. I'm looking for some advice. I need to poll a device on the
  84. serial port and read the data it spits out. Since I don't know how long the 
  85. device might take to respond (usally longer than one tick) I'm assuming
  86. I need to to a Async PBRead since I don't want to tie up the system
  87. waiting for a character. So what the best way to appoach this? Do I use
  88. a few global flags to indicate a read is in progress and time out and
  89. try agian if it doesn't respond the first time?
  90.  
  91. For example (c style pseudo code follows):
  92.  
  93. // see if any data awaits and start the read is there is
  94.  
  95. if (SerGetBuf(refNum,&count) == noErr || !gReadInProgress){
  96.    gReadInProgress = true;
  97.    gTimeout = TickCount() + kTimeOutValue;
  98.      <fill in pb block>
  99.    oe = PBRead(pb,true);
  100. }
  101.  
  102.   // check for no error and for completion
  103.   if (pb.ioResult==noErr && gReadComp){ //gReadComp  set by completion rtn
  104.     <we got our data>
  105.   }
  106.   
  107.   // check for time out
  108.   if (gReadInProgress && TickCount() >= gTimeOut && !gReadComp ){
  109.      // No response Try again
  110.      gReadInProgress = false;
  111.      // How do I stop the async read that is pending? KillIO?    
  112.   }
  113.  
  114.  
  115. Is SerGetBuf appropriate here or is there a low level version I should be
  116. using. The problem that I'm trying to solve is that we were using FSRead
  117. which would hang the system if no characters were waiting. Appearently,
  118. it was possible to be interupted between the call SGB and FSRead and
  119. something else might have gobbled up that character that we were
  120. about to read, so the system would lock up waiting for the nonexistant
  121. char. Is that what you would call a deadly embrace? This interupt coding
  122. is interesting.
  123.  
  124.  
  125. Xavier
  126.  
  127.  
  128.  
  129. -- 
  130. ___________________________________________________________
  131. Matthew Xavier Mora                    Matt_Mora@qm.sri.com
  132. SRI International                       mxmora@unix.sri.com
  133. 333 Ravenswood Ave                    Menlo Park, CA. 94025
  134.  
  135. +++++++++++++++++++++++++++
  136.  
  137. >From resnick@cogsci.uiuc.edu (Pete Resnick)
  138. Date: Wed, 23 Feb 1994 17:17:37 -0600
  139. Organization: University of Illinois at Urbana-Champaign
  140.  
  141. In article <2kg56k$47e@unix.sri.com>, mxmora@unix.sri.com (Matt Mora)
  142. wrote:
  143.  
  144. >I'm looking for some advice. I need to poll a device on the
  145. >serial port and read the data it spits out. Since I don't know how long the 
  146. >device might take to respond (usally longer than one tick) I'm assuming
  147. >I need to to a Async PBRead since I don't want to tie up the system
  148. >waiting for a character. So what the best way to appoach this? Do I use
  149. >a few global flags to indicate a read is in progress and time out and
  150. >try agian if it doesn't respond the first time?
  151.  
  152. Is there any reason to wait for a timeout? Why not simply put an
  153. asynchronous 1-byte PBRead on the serial port? Whenever the data comes in,
  154. you will get your completion routine called, and you can do what you need
  155. to do. If the device will be sending a lot of data, you will need to then
  156. do a SerGetBuf to find out how much data is left and then do a PBRead on
  157. the rest of the data. But forget all this stuff about global flags.
  158.  
  159. If you really do want a timeout, put an asynchronous PBRead on the serial
  160. port (as much data as you want), and then set up a Time Manager task for
  161. the timeout. When the timeout expires, you would call PBKillIO
  162. asynchronously. Remember that KillIO clears all outstanding data too,
  163. which might not be what you want to do. If the read completes, you can
  164. simply remove the TM task.
  165.  
  166. >Is SerGetBuf appropriate here or is there a low level version I should be
  167. >using.
  168.  
  169. You should use the low-level PBStatus call with the appropriate csCode for
  170. SerGetBuf (2). You can call this immediately if you want to. If you do,
  171. you will need to have this glue code:
  172.  
  173. #pragma parameter __D0 PBStatusImmed(__A0)
  174. pascal OSErr PBStatusImmed(ParmBlkPtr paramBlock) = 0xA205; 
  175.  
  176. Otherwise, you can call it asynchronously.
  177.  
  178. Interrupt programming is wonderful!
  179.  
  180. pr
  181. -- 
  182. Pete Resnick        (...so what is a mojo, and why would one be rising?)
  183. Graduate assistant - Philosophy Department, Gregory Hall, UIUC
  184. System manager - Cognitive Science Group, Beckman Institute, UIUC
  185. Internet: resnick@cogsci.uiuc.edu
  186.  
  187. ---------------------------
  188.  
  189. >From ladak@esrican.uucp (Alnoor Ladak)
  190. Subject: C compilers for the MAC - Summary
  191. Date: Tue, 22 Feb 1994 19:58:57 GMT
  192. Organization: ESRI Canada
  193.  
  194. Hi Netters:
  195.  
  196. Due to numerous requests, I have compiled a pseudo-summary of the responses
  197. I received for 'C compilers for the Mac'. I have included all the messages
  198. so that you may form your own opinions based on the various viewpoints for
  199. the same software. The addresses of the individual authors are also included.
  200.  
  201. Hope this helps!
  202.  
  203. I would also like to once again thank all the authors for their input.
  204. Thanks tons!
  205.  
  206. AL.
  207.  
  208.  
  209. **********************************************************************
  210. From: Jacques Marcoux <esri!cmc.aes.doe.CA!jmarcoux>
  211. **********************************************************************
  212.  
  213. There is such beast as shareware C compiler for the Mac, however 
  214. they are pain in the neck.
  215.  
  216. IMHO your friend would be better off shelling out a $120.00 or so
  217. to get Think C from Symantec (educationnal discount)
  218. -------------------------------------------------------------------
  219. language:    C
  220. package:    Harvest C
  221. version:    1.3
  222. parts:        compiler, assembler, linker.
  223. author:        ?
  224. how to get:    ftp mac/development/languages/harves* from archive.umich.edu
  225. description:    The parts of the system are all integrated in a unique
  226.         application, which manages a "project" composed by several C
  227.         source files and resource files (which contain data).
  228. ports:        Macintosh
  229. contact:    Eric W. Sink
  230. updated:    1992/05/26
  231.  
  232. language:    C
  233. package:    C-Interp
  234. version:    ?
  235. parts:        interpreter
  236. author:        ?
  237. how to get:    ftp Mac/Misc/C_Interp.sit from oac2.hsc.uth.tmc.edu
  238. description:    An interpreter for a small subset of C, originally part of a
  239.         communications package.
  240. contact:    ? Chuck Shotton <cshotton@oac.hsc.uth.tmc.edu>
  241. updated:    1993/05/14
  242.  
  243. language:    C, C++, Objective-C, RTL
  244. package:    GNU CC (gcc)
  245. version:    2.5.5
  246. parts:        compiler, runtime, examples, documentation
  247.         Library listed separately
  248. author:        Richard Stallman <rms@gnu.ai.mit.edu> and others
  249. how to get:    ftp gcc-2.4.5.tar.gz from a GNU archive site
  250.     msdos:    ftp pub/msdos/djgpp/* from omnigate.clarkson.edu
  251.     Macintosh:    ftp mpw-gcc-1.37.1r14 from ?
  252. ----- try sumex.aim and/or ftp.apple.com -------------------
  253. description:    A very high quality, very portable compiler for C, C++,
  254.         Objective-C.  The compiler is designed to support multiple
  255.         front-ends and multiple back-ends by translating first
  256.         into RTL (Register Transfer Language) and from there into
  257.         assembly for the target architecture.    Front ends for
  258.         Ada, Pascal, and Fortran are all under development.
  259. conformance:    C: superset of K&R C and ANSI C.
  260.         C++: not exactly cfront 3.0? [could someone tell me which
  261.         version of cfront it is equivalent to, if any?    --ed]
  262.         Objective-C: ?
  263. bugs:        gnu.gcc.bug
  264. restriction:    GNU General Public License
  265. ports:        3b1, a29k, aix385, alpha, altos3068, amix, arm, convex,
  266.         crds, elxsi, fx2800, fx80, genix, hp320, clipper,
  267.         i386-{dos,isc,sco,sysv.3,sysv.4,mach,bsd,linux,windows,OS/2},
  268.         iris,i860, i960, irix4, m68k, m88ksvsv.3, mips-news,
  269.         mot3300, next, ns32k, nws3250-v.4, hp-pa, pc532,
  270.         plexus, pyramid, romp, rs6000, sparc-sunos,
  271.         sparc-solaris2, sparc-sysv.4, spur, sun386, tahoe, tow,
  272.         umpis, vax-vms, vax-bsd, we32k, hitachi-{SH,8300}
  273.  
  274. **********************************************************************
  275. From: esri!hydra.rose.brandeis.edu!reuber (Kent Reuber)
  276. **********************************************************************
  277.  
  278. Think C from Symantec is one of the best C compilers around. It isn't free,
  279. but Symantec offers very generous educational discounts. The cost at
  280. Brandeis is about US$60.
  281.  
  282. **********************************************************************
  283. From: esri!ecn.purdue.edu!jess (Jess M Holle)
  284. **********************************************************************
  285.  
  286. DO NOT go shareware on this!  On just about any other type of software,
  287. I'd advise you to look at shareware first, but not for a Mac C compiler.
  288. The only free/shareware C compiler for the Mac OS that works to some
  289. degree is Harvest C, but its author has admitted it has lots of bugs and
  290. that he has no time to fix them or upgrade the package.
  291.  
  292. Actually, there is 1 _reasonable_ option for the C-guru who likes UNIX.
  293. The option is to get MacMint, a freeware UNIX-like pseudo-OS.  It runs
  294. as a process under the Mac OS, but runs programs compiled for it 
  295. pre-emptively under it.  If you get gcc, etc, for MacMint, then you can
  296. compile programs for MacMint and run them.  This will only cost you in
  297. hard drive space, download time, setup time, learning curve (unless you
  298. are a UNIX/gcc guru), etc.
  299.  
  300. I'd recommend either picking up Think C or, for the more serious user,
  301. CodeWarrior (which is still in the development stage).  Think C is only
  302. about $60 educational price.  A "teacher friend" ought to be able to
  303. finagle this price.  Symantec C++ still has some real problems, but Think
  304. C is a rather solid ANSI C compiler with a very easy learning curve, nice
  305. environment, and good debugger.  The $60 would pay off in the first few
  306. hours of debugging, since the best debugger the MacMint stuff provides
  307. is the GNU version of dbx, if that.  Also, Think C automatically figures
  308. out how to "make" your projects, so you save all the time that you would
  309. spend writing make files under MacMint.  Finally, don't forget that 
  310. programs compiled under MacMint only run under MacMint, so if he would 
  311. like to have others run the software someday, MacMint is probably out.
  312. Think C and Symantec C++ are available from Symantec.
  313.  
  314. CodeWarrior is similar to Think C, BUT only available on CD, is still in
  315. development (though anyone can buy it now even), and _probably_ not as
  316. well tested.  CodeWarrior's C++ _sounds_ more stable than Symantec's,
  317. and some limitations of the Think environment are not present in the
  318. CodeWarrior environment.  CodeWarrior also has educational prices and
  319. is available from Metrowerks.
  320.  
  321. >PS. He does not have net access, so please respond to me & I'll
  322.  
  323. This would make MacMint usage more difficult since all the pieces and
  324. all the support are available almost solely from the net.
  325.  
  326. The bottom line _to a degree_ is that you get what you pay for.  This is
  327. not true in the extreme, however.  I would not recommend MPW C, which is
  328. the other major C option on the Mac.  It is expensive, hard-to-use, hard
  329. to learn, etc.  After using MPW for quite a while, I'd advise against its
  330. purchase except for C++ development and even in that case with CodeWarrior
  331. out on the market now and Symantec C++ improving.
  332.  
  333. **********************************************************************
  334. From: "Joseph S. D'Elia" <esri!crl.com!silk>
  335. **********************************************************************
  336.  
  337. I don't know of any Shareware C programs out there (that doesn't mean 
  338. there aren't any) but I have a copy of Think C 5.0 he can buy with all 
  339. documentation and manuals.  It would only cost him $50.  
  340.  
  341. I recently purchased Think C 6.0 so I don't need 5.0 anymore.  If nothing 
  342. else comes your way, keep it in mind.  It is just sitting on my shelf.
  343.  
  344. **********************************************************************
  345. From: esri!katya.acs.ilstu.edu!bavogler (Benjamin A. Vogler)
  346. **********************************************************************
  347.  
  348. You can get Apple's C GCC compiler from ftp.apple.com...
  349.  
  350. **********************************************************************
  351. From: Chong Richard Ng Kim <esri!cdf.toronto.edu!a260chon>
  352. **********************************************************************
  353.  
  354. Hi Al!
  355.  
  356. Don't know of any shareware C compilers for the Mac. In fact, the only Mac C
  357. compilers that I know of are Symantec's THINK C and Apple's MPW C.
  358.  
  359. If your friend is a member of a user group, tell him to call Symantec Canada.
  360. (They're in the Toronto phone book.) As a UG member, you can get THINK C for
  361. only $79 Canadian (+PST+GST of course!)
  362.  
  363. If your friend isn't a member of a UG, then might I suggest ClubMac? (I'm a
  364. CMAC member myself.) There's an info line for CMAC at (416) 462-1702. If
  365. your friend wants more info then just leave name & address &/or phone # on the
  366. answering machine and someone will be in touch soon thereafter.
  367.  
  368. Hope this helps out some!
  369.  
  370. **********************************************************************
  371. From: esri!astro.uu.se!Olof.Morell (Olof Morell)
  372. **********************************************************************
  373.  
  374. Think C, current version 6.0. Commercial from Symantec corp.
  375. If you can find an used 5.0.x version for not too much it's a bargain...
  376.  
  377. Good compiler.
  378.  
  379. **********************************************************************
  380. From: Ben Cottrell <esri!soda.berkeley.edu!benco>
  381. **********************************************************************
  382.  
  383. Try Harvest C, which can be gotten off of sumex-aim.stanford.edu and numerous
  384. other places.
  385.  
  386. Tell me if you want more information or need help finding it!
  387.  
  388. **********************************************************************
  389. From: esri!marie.physik.tu-berlin.de!georg (Georg Schwarz)
  390. **********************************************************************
  391.  
  392. Harvest C 1.3 is freeware. Try it!
  393.  
  394.  
  395. -- 
  396. ______________________________________________________________________________
  397. Alnoor Ladak (email aladak@esri.com) |Somebody ought to cross ball point pens
  398. ESRI Canada, 49 Gervais Dr.,         |  with coat hangers  so that the pens
  399. Don Mills, Ont. M3C 1Y9              |   will muliply instead of disappear
  400.  
  401. ---------------------------
  402.  
  403. >From csdamle@magnus.acs.ohio-state.edu (Chandrashekhar S Damle)
  404. Subject: Fortran compilers for the Mac
  405. Date: 22 Feb 1994 18:59:45 GMT
  406. Organization: The Ohio State University
  407.  
  408.  
  409. If anybody has any experience with Macintosh Fortran compilers sold
  410. by Language Systems or Absoft, I would appreciate it if they could
  411. relate their experiences to me.
  412.  
  413. I am thinking of buying a Fortran compiler for our Mac IIci with system 7.1
  414. I have received some information from both of these companies, but
  415. would appreciate it if somebody who has real experience on them could
  416. give me their opinions.
  417.  
  418. Thank you.
  419.  
  420. Shekhar Damle
  421. damle@kcgl1.eng.ohio-state.edu
  422.  
  423. +++++++++++++++++++++++++++
  424.  
  425. >From chang@oasys.dt.navy.mil (Peter Chang)
  426. Date: 23 Feb 1994 08:37:02 -0500
  427. Organization: Carderock Division, NSWC, Bethesda, MD
  428.  
  429.  
  430. In comp.lang.fortran, csdamle@magnus.acs.ohio-state.edu (Chandrashekhar S Damle) writes:
  431. >If anybody has any experience with Macintosh Fortran compilers sold
  432. >by Language Systems or Absoft, I would appreciate it if they could
  433. >relate their experiences to me.
  434. >
  435. I have been using Language Systems Fortran for the Mac for the past
  436. 5 years.  I have no experience with Absoft. Here's a random list of
  437. thoughts concerning LS Fortran running inside MPW:
  438. - you have to learn how to get around inside the MPW shell. At first
  439. a little arcane, but eventually feels like a low power Unix shell. YOu
  440. can customize MPW to the same commands as Unix.  MPW gives you command
  441. line file maniupulation (as opposed to Finder) which is very powerful
  442. and makes up for the deficiencies in Finder.
  443. - the LS Fortran has some very nice extensions, e.g. cycle and leave
  444. statements for do loops.
  445. - the editor makes programming very quick. For instance indenting large
  446. blocks of code makes programming much more organized. I have not used
  447. a statement label (except for formats) in a long time.
  448. - many compiler options for various debugging modes and optimization
  449. levels.
  450. - source code debugger
  451. - I do all my programming in MPW, then port over to various Crays etc.
  452. - My comments are more based on use of MPW. I am very pleased with LS
  453. Fortran, but as stated above cannot compare it with Absoft.
  454.  
  455. Please email me if you have more specific questions.
  456. ------------------------------------------------------------------------------
  457. Peter Asha Chang, III         |"That's exactly the method", the Bellman bold
  458. chang@oasys.dt.navy.mil       |              In a  hasty parenthesis cried,
  459. 301.227.1798 (voice)          |"That's exactly the way I have always been told
  460. 301.227.3883 (fax)            |   That the capture of Snarks should be tried"
  461. David Taylor Model Basin      |               --Lewis Carroll
  462. Bethesda, MD, USA             |               Alice in Wonderland
  463. -------------------------------------------------------------------------------
  464.  
  465. -------------------------------------------------------------------------------
  466. Peter Asha Chang, III         |"That's exactly the method", the Bellman bold
  467. chang@oasys.dt.navy.mil       |              In a  hasty parenthesis cried,
  468. 301.227.1798 (voice)          |"That's exactly the way I have always been told
  469. 301.227.3883 (fax)            |   That the capture of Snarks should be tried"
  470. David Taylor Model Basin      |               --Lewis Carroll
  471. Bethesda, MD, USA             |               Alice in Wonderland
  472. -------------------------------------------------------------------------------
  473.  
  474.  
  475. +++++++++++++++++++++++++++
  476.  
  477. >From shepard@bonnie.mcs.anl.gov (Ron Shepard)
  478. Date: Wed, 23 Feb 1994 18:34:51 GMT
  479. Organization: Argonne National Laboratory, Chicago, Illinois
  480.  
  481. In article <2kfm5uINN56n@oasys.dt.navy.mil> chang@oasys.dt.navy.mil (Peter Chang) writes:
  482. >
  483. >In comp.lang.fortran, csdamle@magnus.acs.ohio-state.edu (Chandrashekhar S Damle) writes:
  484. >>If anybody has any experience with Macintosh Fortran compilers sold
  485. >>by Language Systems or Absoft, I would appreciate it if they could
  486. >>relate their experiences to me.
  487. >>
  488. >I have been using Language Systems Fortran for the Mac for the past
  489. >5 years.  I have no experience with Absoft. Here's a random list of
  490. >thoughts concerning LS Fortran running inside MPW:
  491. [...]
  492.  
  493. I have experimented with various versions of LS Fortran on the Mac too,
  494. but I always seemed to run into some small bug that would stop me from
  495. doing what I needed to do.  I don't mean to pick on LS Fortran in
  496. particular; this comment probably applies to all PC type fortran
  497. compilers.  I just don't know if you can really expect to find
  498. "industrial strength" compilers like those you find on workstations,
  499. minis, supercomputers, etc.
  500.  
  501. For example, I remember with LS Fortran that list-directed I/O on
  502. character arrays would not work.  Many of my application codes use
  503. this, so when I ran into the bug, it pretty much halted progress.
  504.  
  505.       character*8 carray(5)
  506.       data carray/ '1', '2', '3', '4', '5' /
  507.       read(5,*) carray
  508.       write(6,*) carray
  509.       end
  510.  
  511. input file:
  512.  'new1' 'new2' / take the default values for the rest
  513.  
  514. When executed, the correct output should be:
  515.  
  516.  new1    new2    3       4       5
  517.  
  518. But with (on several versions at least) LS Fortran you get:
  519.  
  520.  new1    new2    /       take    the
  521.  
  522. Maybe this has been fixed (anyone know?).  It is just something to watch
  523. out for with PC-class compilers.
  524.  
  525. $.02 -Ron Shepard
  526.  
  527. +++++++++++++++++++++++++++
  528.  
  529. >From walsteyn@fys.ruu.nl (Fred Walsteijn)
  530. Date: Wed, 23 Feb 1994 22:58:14 GMT
  531. Organization: Physics Department, University of Utrecht, The Netherlands
  532.  
  533. In <76202849143920@bonnie.mcs.anl.gov> shepard@bonnie.mcs.anl.gov (Ron Shepard) writes:
  534.  
  535. >....  I just don't know if you can really expect to find
  536. >"industrial strength" compilers like those you find on workstations,
  537. >minis, supercomputers, etc.
  538. >For example, I remember with LS Fortran that list-directed I/O on
  539. >character arrays would not work.  Many of my application codes use
  540. >this, so when I ran into the bug, it pretty much halted progress.
  541. >      character*8 carray(5)
  542. >      data carray/ '1', '2', '3', '4', '5' /
  543. >      read(5,*) carray
  544. >      write(6,*) carray
  545. >      end
  546. > [stuff deleted]
  547. >Maybe this has been fixed (anyone know?).  It is just something to watch
  548. >out for with PC-class compilers.
  549.  
  550. Hello Ron,
  551. The latest version of LS Fortran (3.3) works OK:
  552. ***input:
  553. 'new1' 'new2' / take the default values for the rest 
  554. ***output:
  555. new1    new2    3       4       5       
  556.  
  557. I agree with your remark on the quality of compilers.
  558. If you limit yourself to the Mac, however, then LS Fortran is a good choice.  
  559. I use the MPW Shell for 90% of my Fortran code editing, and use LS Fortran
  560. (sometimes) for some initial tests (and use FTNCHEK in MPW as well).
  561. At home I do all my work with LS Fortran.
  562.  
  563. _____________________________________________________________________________
  564. Fred Walsteijn                                | Internet: walsteyn@fys.ruu.nl
  565. Institute for Marine and Atmospheric Research | FAX:      31-30-543163
  566. Utrecht University, The Netherlands           | Phone:    31-30-533169
  567.  
  568. ---------------------------
  569.  
  570. >From neeri@iis.ee.ethz.ch (Matthias Neeracher)
  571. Subject: Getting time zone settings from Map control panel
  572. Date: 20 Feb 1994 21:08:56 GMT
  573. Organization: Swiss Federal Institute of Technology (ETHZ)
  574.  
  575. I am wondering if there is a way to derive time zone information from
  576. the settings of the Map control panel. I seem to have seen this in
  577. a few programs. On a related topic, can anybody who has used this 
  578. information comment on how high a percentage of Mac users configures
  579. their Map control panel correctly?
  580.  
  581. Respondents will earn my eternal gratitude.
  582.  
  583. Matthias
  584.  
  585. -----
  586. Matthias Neeracher                                      neeri@iis.ee.ethz.ch
  587.       "Success is what me make of the mess we have made out of things"
  588.  
  589. +++++++++++++++++++++++++++
  590.  
  591. >From wdh@netcom.com (Bill Hofmann)
  592. Date: Sun, 20 Feb 1994 22:12:43 GMT
  593. Organization: NETCOM On-line Communication Services (408 241-9760 guest)
  594.  
  595. neeri@iis.ee.ethz.ch (Matthias Neeracher) writes:
  596. >I am wondering if there is a way to derive time zone information from
  597. >the settings of the Map control panel. I seem to have seen this in
  598. >a few programs. On a related topic, can anybody who has used this 
  599. >information comment on how high a percentage of Mac users configures
  600. >their Map control panel correctly?
  601. ReadLocation reads a rather bizarre data structure which encodes the
  602. current lat/long and the time zone.  Currently undocumented (uh oh) but
  603. important: the union that encodes the time zone info and the "dlsDelta"
  604. uses the high order bit of dlsDelta to tell you that daylight savings
  605. is currently on, at least in System 7 Pro.  See IM VI for more info.
  606. Another piece of info: gmtDelta reflects not the time zone but the delta
  607. from GMT, which may need to be adjusted if DST is on.
  608.  
  609. Well, I'd guess a small percentage use this feature.  7Pro encourages it,
  610. but since my software requires it, I more or less force the user to set it.
  611.  
  612. >Respondents will earn my eternal gratitude.
  613. Wow.
  614. >Matthias
  615.  
  616. >-----
  617. >Matthias Neeracher                                      neeri@iis.ee.ethz.ch
  618. >      "Success is what me make of the mess we have made out of things"
  619. -- 
  620. -Bill Hofmann                    wdh@netcom.COM
  621.  Fresh Software and Instructional Design    +1 510 524 0852
  622.  
  623. +++++++++++++++++++++++++++
  624.  
  625. >From neeri@iis.ee.ethz.ch (Matthias Neeracher)
  626. Date: 22 Feb 94 17:44:14
  627. Organization: Integrated Systems Laboratory, ETH, Zurich
  628.  
  629. In article <wdhCLJn18.7r1@netcom.com>, wdh@netcom.com (Bill Hofmann) writes:
  630.  
  631. > neeri@iis.ee.ethz.ch (Matthias Neeracher) writes:
  632. >>I am wondering if there is a way to derive time zone information from
  633. >>the settings of the Map control panel.
  634.  
  635. > ReadLocation reads a rather bizarre data structure which encodes the
  636. > current lat/long and the time zone.
  637.  
  638. Thank you very much. As soon as I had the routine name, I was able to find what
  639. was documented in the Script Manager chapter of IM VI. This information doesn't
  640. seem to have made it into the Script Manager chapter of NIM:Text (doesn't have
  641. much to do with text, anyway), I wonder where it will end up in the NIM series.
  642.  
  643. > Well, I'd guess a small percentage use this feature.
  644.  
  645. This was also the consensus of the e-mail messages I received. Thanks to
  646. Michael Hanson, Scott M. Silver, and Douglas Rowe for their helpful
  647. suggestions.
  648.  
  649. Matthias
  650.  
  651. -----
  652. Matthias Neeracher                                  neeri@iis.ee.ethz.ch
  653.   "And that's why I am going to turn this world upside down, and make
  654.    of it a fire so *bright* that someone real will notice"
  655.                                 -- Vernor Vinge, _Tatja Grimm's World_
  656.  
  657. ---------------------------
  658.  
  659. >From tim@zikzak.apana.org.au (Tim Shimmin)
  660. Subject: Grow-box icon drawn w-o scroll lines
  661. Date: 22 Feb 1994 13:34:50 +1100
  662. Organization: Zikzak Public Access UNIX, Melbourne Australia
  663.  
  664. I would like to be able to draw the grow-box icon for
  665. a window but without the scroll-lines being drawn -
  666. which happens when calling DrawGrowIcon.
  667. Could someone please enlighten me as to how it is done.
  668. I have a vertical palette on the left hand side which
  669. I don't want "over-drawn" by a scroll line.
  670.  
  671. Thanks.
  672.  
  673. --tim
  674. -- 
  675.                    Tim Shimmin - tim@zikzak.apana.org.au
  676.         Zikzak public access UNIX, Melbourne, Australia.
  677.  
  678. +++++++++++++++++++++++++++
  679.  
  680. >From b-clark@nwu.edu (Brian Clark)
  681. Date: Mon, 21 Feb 1994 22:25:31 -0600
  682. Organization: Northwestern University
  683.  
  684. In article <2kbr0o$se1@zikzak.apana.org.au>, tim@zikzak.apana.org.au (Tim
  685. Shimmin) wrote:
  686.  
  687. > I would like to be able to draw the grow-box icon for
  688. > a window but without the scroll-lines being drawn -
  689. > which happens when calling DrawGrowIcon.
  690. > Could someone please enlighten me as to how it is done.
  691. > I have a vertical palette on the left hand side which
  692. > I don't want "over-drawn" by a scroll line.
  693.  
  694. I believe one way to do this is covered in one of the Macintosh Inside Out
  695. series of books from Addison-Wesley titled "Macintosh Programming Secrets"
  696. by a couple of unknowns named Knaster and Rollins :-). As I recall, the
  697. secret is to save the current clip region, set the new clip region to
  698. include only the icon, call DrawGrowIcon, then restore the original clip
  699. region.
  700.  
  701. +++++++++++++++++++++++++++
  702.  
  703. >From Carl R. Osterwald <carl_osterwald@nrel.gov>
  704. Date: Mon, 21 Feb 94 04:39:43 GMT
  705. Organization: National Renewable Energy Lab.
  706.  
  707. In article <2kbr0o$se1@zikzak.apana.org.au> Tim Shimmin,
  708. tim@zikzak.apana.org.au writes:
  709. >I would like to be able to draw the grow-box icon for
  710. >a window but without the scroll-lines being drawn -
  711. >which happens when calling DrawGrowIcon.
  712. >Could someone please enlighten me as to how it is done.
  713.  
  714. Sure.
  715.  
  716. 1.  Save existing window clipping region
  717. 2.  Set clipping region to rectangle containing only GrowIcon
  718. 3.  Call DrawGrowIcon
  719. 4.  Restore window clipping region
  720.  
  721. +++++++++++++++++++++++++++
  722.  
  723. >From rmah@panix.com (Robert S. Mah)
  724. Date: Tue, 22 Feb 1994 00:01:51 -0500
  725. Organization: One Step Beyond
  726.  
  727. tim@zikzak.apana.org.au (Tim Shimmin) wrote:
  728.  
  729. > I would like to be able to draw the grow-box icon for a window but without
  730. > the scroll-lines being drawn - which happens when calling DrawGrowIcon.
  731. > Could someone please enlighten me as to how it is done.
  732.  
  733. Sure thing.  See the code below.
  734.  
  735. Cheers,
  736. Rob
  737. ________________________________________________________________________
  738.  Robert S. Mah              One Step Beyond              rmah@panix.com
  739.  
  740.  
  741. #define kGrowBoxSize 16
  742.  
  743. void DrawGrowIconNoLines( WindowPtr wp, Boolean hideLines )
  744. {
  745.     RgnHandle  saveClip;
  746.     GrafPtr    savePort;
  747.     Rect       growBox;
  748.     
  749.     if( hideLines == false ){
  750.         DrawGrowIcon( wp );
  751.     }else{
  752.         saveClip = NewRgn();
  753.         if( saveClip == NULL )
  754.             return;
  755.  
  756.         GetPort( &savePort );
  757.         SetPort( wp );
  758.     
  759.         GetClip( saveClip );
  760.        
  761.         growBox.right  = wp->portRect.right;
  762.         growBox.bottom = wp->portRect.bottom;
  763.         growBox.left   = growBox.right - kGrowBoxSize;
  764.         growBox.top    = growBox.bottom - kGrowBoxSize;
  765.  
  766.         ClipRect( &growBox );
  767.         DrawGrowIcon( wp );
  768.  
  769.         SetClip( saveClip );
  770.         SetPort( savePort );
  771.         DisposeRgn( saveClip );
  772.     }
  773. }
  774.  
  775. ---------------------------
  776.  
  777. >From a-kowald@nimr.mrc.ac.uk (Axel Kowald)
  778. Subject: How to get all fonts ?
  779. Date: Mon, 21 Feb 1994 10:20:08 GMT
  780. Organization: Manchester Computing Centre
  781.  
  782. Hi 
  783.  
  784. What is the proper way to get a list of all fonts which are installed
  785. on a mac ?  I could use GetFontName() but it seems the font numbers can be
  786. scattered around the whole integer range. I can't imagine I have to scan
  787. all integer numbers, so what is the way to do it ?
  788.  
  789.             Thanks
  790.                                 Axel (a_kowald@nimr.mrc.ac.uk)
  791.  
  792. +++++++++++++++++++++++++++
  793.  
  794. >From Reid Ellis <rae@Alias.com>
  795. Date: Tue, 22 Feb 1994 20:06:41 GMT
  796. Organization: Alias Research, Inc., Toronto ON Canada
  797.  
  798. Axel Kowald <a-kowald@nimr.mrc.ac.uk> writes:
  799. |What is the proper way to get a list of all fonts which are
  800. |installed on a mac ?  I could use GetFontName() but it seems the
  801. |font numbers can be scattered around the whole integer range. I
  802. |can't imagine I have to scan all integer numbers, so what is the
  803. |way to do it ?
  804.  
  805. I can't remember where I saw it, but the documented way of doing
  806. this is to create a menu, call AddResMenu(theMenu, 'FOND') [*not
  807. 'FONT'!], loop through all the menu items, copying the item's
  808. string into a list of font names you are creating, and when you
  809. are done, get rid of the menu again.
  810.  
  811. Intuitive, eh?  :-/
  812.  
  813. Reid
  814. --
  815. Reid Ellis, Alias Research Inc.
  816. +1 416 362 9181 <rae@Alias.com>
  817.  
  818. ---------------------------
  819.  
  820. >From Scott_Gruby@hmc.edu (Scott Gruby)
  821. Subject: Interacting with a POP Server
  822. Date: Sat, 19 Feb 1994 23:19:35 -0800
  823. Organization: Harvey Mudd College, Claremont CA
  824.  
  825. Does anyone out there know how to interact with a POP server via MacTCP?
  826. What I would like to do is simply send a username and password and see if
  827. new mail is there and then close the connection (I don't want to get the
  828. mail.).
  829.  
  830. a) What commands do I have to send to the POP server?
  831.  
  832. b) What is the easiest way to do it?
  833.  
  834. Thanks.
  835.  
  836. -- 
  837. Scott Allen Gruby                         (Scott_Gruby@hmc.edu)
  838.  
  839. +++++++++++++++++++++++++++
  840.  
  841. >From peter@ncrpda.curtin.edu.au (Peter N Lewis)
  842. Date: 21 Feb 1994 11:16:19 +0800
  843. Organization: NCRPDA, Curtin University
  844.  
  845. Scott_Gruby@hmc.edu (Scott Gruby) writes:
  846.  
  847. >Does anyone out there know how to interact with a POP server via MacTCP?
  848. >What I would like to do is simply send a username and password and see if
  849. >new mail is there and then close the connection (I don't want to get the
  850. >mail.).
  851.  
  852. POP, like all good protocols (and surprisingly enough, POP is actually quite
  853. a good protocol) is documented in an RFC (Request for Comment).  They are
  854. stored at munnari.oz.au:/rfc (amoungst other places).  This directory has
  855. zillions of files in it, so listing it is somewhat tedious.  The relevent file
  856. is munnari.oz.au:rfc/POP3.Z.
  857.  
  858. telnet <ip> pop3
  859. R: +OK ncrpda POP3 Server (Version 1.002) ready.
  860. S: user peter
  861. R: +OK please send PASS command
  862. S: pass *****
  863. R: +OK 0 messages ready for peter in /usr/spool/mail/peter
  864. S: quit
  865. R: +OK whatever
  866.  
  867. Enjoy,
  868.    Peter.
  869. -- 
  870. _______________________________________________________________________
  871. Peter N Lewis <peter.lewis@info.curtin.edu.au>       Ph: +61 9 368 2055
  872.  
  873. +++++++++++++++++++++++++++
  874.  
  875. >From philip@concave.cs.wits.ac.za (Philip Machanick)
  876. Date: Mon, 21 Feb 1994 12:21:54 +0200
  877. Organization: Computer Science Dept, U of Witwatersrand
  878.  
  879. In article <Scott_Gruby-190294231935@eagle.st.hmc.edu>, Scott_Gruby@hmc.edu
  880. (Scott Gruby) wrote:
  881.  
  882. > Does anyone out there know how to interact with a POP server via MacTCP?
  883. > What I would like to do is simply send a username and password and see if
  884. > new mail is there and then close the connection (I don't want to get the
  885. > mail.).
  886. > a) What commands do I have to send to the POP server?
  887. > b) What is the easiest way to do it?
  888.  
  889. Telnet to your mail host to port 110 (or 109 if that doesn't work), tell it
  890. who you are then quit.
  891.  
  892. For example - replace "concave" by the name of your mail host in what
  893. follows, and of course put in your own user name and password (lines
  894. starting with "+" are output from the server):
  895. --
  896. telnet concave 110
  897. Trying 146.141.15.20...
  898. Connected to concave.cs.wits.ac.za.
  899. Escape character is '^]'.
  900. +OK UCB Pop server (version 1.831beta) at concave.cs.wits.ac.za starting.
  901. user philip
  902. +OK Password required for philip.
  903. pass ########
  904. +OK philip has 0 message(s) (0 octets).
  905. quit
  906. +OK Pop server at concave.cs.wits.ac.za signing off.
  907. Connection closed by foreign host.
  908. --
  909. If you want to write a program to do this, good luck.
  910. -- 
  911. Philip Machanick                   philip@concave.cs.wits.ac.za
  912. Department of Computer Science, University of the Witwatersrand
  913. 2050 Wits, South Africa
  914. phone 27(11)716-3309  fax 27(11)339-7965
  915.  
  916. ---------------------------
  917.  
  918. >From shiekh@ictp.trieste.it (Andy Shiekh)
  919. Subject: Interrupting an interrupt
  920. Date: Mon, 21 Feb 1994 12:24:48 +0100
  921. Organization: International Centre for Theoretical Physics
  922.  
  923.   I recently read in "The Art of Electronics" concerning programming
  924. the 68000 series that:
  925.  
  926.   In order to prevent pandemonium, the CPU disables interrupts when
  927. it jumps to the handler, and reenables them when it executes RTE.
  928. If you have a long winded handler, you may want to re-enable interrupts
  929. (at higher-priority levels only) within the handler, which you can do
  930. by sending the appropriate byte to the status register.
  931.  
  932.   Can anyone enlighten me on what the appropriate byte is?
  933.  
  934.  
  935. Andy
  936.  
  937. +++++++++++++++++++++++++++
  938.  
  939. >From ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
  940. Date: 22 Feb 94 11:32:53 +1300
  941. Organization: University of Waikato, Hamilton, New Zealand
  942.  
  943. In article <shiekh-210294122448@mac-160.ictp.trieste.it>, shiekh@ictp.trieste.it (Andy Shiekh) writes:
  944. >   I recently read in "The Art of Electronics" concerning programming
  945. > the 68000 series that:
  946. >
  947. >   In order to prevent pandemonium, the CPU disables interrupts when
  948. > it jumps to the handler, and reenables them when it executes RTE.
  949. > If you have a long winded handler, you may want to re-enable interrupts
  950. > (at higher-priority levels only) within the handler, which you can do
  951. > by sending the appropriate byte to the status register.
  952.  
  953. I was aware of no such thing. My understanding of interrupt handling on
  954. the 68K family (or on any CPU family, for that matter), is that
  955.  
  956. a) the priority of the interrupt request is compared against the current
  957. CPU priority, and the interrupt is only granted if its priority is higher, and
  958. b) before entering the interrupt service routine, the CPU priority is raised
  959. to the interrupt priority. This blocks out further interrupts at the same or
  960. a lower priority, until the interrupt service routine has finished.
  961.  
  962. Thus there is no automatic disabling of _all_ interrupts--just those that
  963. haven't got a higher priority.
  964.  
  965. The only time that code needs to fiddle the CPU priority is when it is
  966. synchronizing with interrupt code. For example, say you're writing a device
  967. driver for a device that generates interrupts at priority p. When driver
  968. code (for example, invoked as a result of a user call) needs to access data
  969. structures that are also accessed by the interrupt service routine, then you
  970. need to raise the priority to at least p while doing the access (and restore
  971. it to what it was before afterwards), otherwise you could end up with
  972. inconsistent data.
  973.  
  974. Note: you should never *lower* CPU priority from what it was when your code
  975. was entered. Doing so can destroy the interrupt nesting scheme, break the
  976. synchronization assumptions in other interrupt handlers, and generally cause
  977. havoc.
  978.  
  979. Lawrence D'Oliveiro                       fone: +64-7-856-2889
  980. Info & Tech Services Division              fax: +64-7-838-4066
  981. University of Waikato            electric mail: ldo@waikato.ac.nz
  982. Hamilton, New Zealand    37^ 47' 26" S, 175^ 19' 7" E, GMT+13:00
  983.  
  984. ---------------------------
  985.  
  986. >From pindar3@cix.compulink.co.uk (Pindar Infotek Ltd)
  987. Subject: Partial pathnames in FSMake
  988. Date: 22 Feb 1994 03:02:35 -0600
  989. Organization: UTexas Mail-to-News Gateway
  990.  
  991. >From Pindar user Ian McCall
  992.  
  993. Subject: _Partial pathnames in FSMakeFSSpec
  994. Hello.
  995.  
  996. I'm having a problem locating files in a directory structure that's
  997. been set up. The structure is as follows:
  998.  
  999. File server root:Notes:a:b:c:abcxxx
  1000.  
  1001. where a, b, and c are single digits, and xxx are also digits.
  1002.  
  1003. I've set up an alias resource to 'File server root', which is
  1004. correctly being resolved. I'd now like to use the FSSpec I receive
  1005. through that resolution plus a partial pathname of
  1006. 'Notes:a:b:c:abcxxx' to specify a file. Whenever I try however, I'm
  1007. constistently getting back a -35 err - no such volume.
  1008.  
  1009. I've set the FSSpec of the file to equal fileServerRoot.vRefNum,
  1010. fileServerRoot.parID, and 'Notes:a:b:c:abcxxx' for each of the
  1011. fields.
  1012.  
  1013. What's going wrong? Please reply via email, since I don't actually
  1014. get to read this group.
  1015.  
  1016. Thanks in advance for any information.
  1017.  
  1018.  
  1019.  
  1020. ---
  1021. Please make 'Attn:<space>Ian McCall' the first line of your reply
  1022. (not the subject) to ensure automatic forwarding to the correct
  1023. Pindar user.
  1024.  
  1025. +++++++++++++++++++++++++++
  1026.  
  1027. >From peter@ncrpda.curtin.edu.au (Peter N Lewis)
  1028. Date: 23 Feb 1994 11:25:17 +0800
  1029. Organization: NCRPDA, Curtin University
  1030.  
  1031. pindar3@cix.compulink.co.uk (Pindar Infotek Ltd) writes:
  1032.  
  1033. >through that resolution plus a partial pathname of
  1034. >'Notes:a:b:c:abcxxx' to specify a file. Whenever I try however, I'm
  1035. >constistently getting back a -35 err - no such volume.
  1036.  
  1037. Thats because 'Notes:a:b:c:abcxxx' is not a partial pathname.  Its a full
  1038. pathname.  ':Notes:a:b:c:abcxxx' is what you want.  A pathname is partial
  1039. if and only iff it contains no colons, or it starts with a colon.
  1040.  
  1041. >What's going wrong? Please reply via email, since I don't actually
  1042. >get to read this group.
  1043.  
  1044. See my note about "rules for posting" ;-)
  1045.    Peter.
  1046. -- 
  1047. _______________________________________________________________________
  1048. Peter N Lewis <peter.lewis@info.curtin.edu.au>       Ph: +61 9 368 2055
  1049.  
  1050. ---------------------------
  1051.  
  1052. >From Brian Patrick Arnold <ba0k+@andrew.cmu.edu>
  1053. Subject: PowerPC & CFM query
  1054. Date: Tue, 22 Feb 1994 18:58:45 -0500
  1055. Organization: Sponsored account, Engineering and Public Policy, Carnegie Mellon, Pittsburgh, PA
  1056.  
  1057.  
  1058. I have some hard questions regarding PowerPC migration that I figure I
  1059. ought to start addressing as soon as possible.
  1060.  
  1061. I want some of you to help me guestimate the tradeoffs in migrating a
  1062. MacApp 2.0 application to PowerPC.  Please reply directly to me and I
  1063. will do my best to summarize any helpful replies.
  1064.  
  1065. Assumptions:
  1066. -----------
  1067. o  App uses MacApp 2.0 with "7.0 for MacApp 2.0" modifications
  1068. o  App's user interface is written in MPW Object Pascal 3.2
  1069. o  App's kernel (50% of code) is written in C, with a tiny bit of
  1070.    C++, with no MacApp/PascalObject dependency (except via
  1071.    vanilla procedures)
  1072. o  App's kernel has all relevant computation-intensive code
  1073. o  App has been tested to run on PowerPC architecture with its
  1074.    unmodified 68k code
  1075.  
  1076. Hard choices:
  1077. ------------
  1078. a. Port the kernel to PowerPC but keep the interface in MC68k
  1079. b. Port the kernel and interface code as-is, all for PowerPC
  1080. c. Translate interface code to C++, upgrade to MacApp 3.0 and then 3.1
  1081.  
  1082. The goal being sought is to change as little code as possible in as 
  1083. little time as possible.  I have a sneaky suspicion that I can get away
  1084. with option (a) in far less time than option (b) or (c) if I knew the 
  1085. rights answers as to how to do it.
  1086.  
  1087. Tradeoffs:
  1088. ---------
  1089. Option (a) requires dipping into code fragments and/or dynamic linking.
  1090. How hard is it to turn half of an existing API on its head, compile 
  1091. part of it for PowerPC and have it be directly accessible with 68k code
  1092. via the Code Fragment Manager?  Easy?  Tedious?
  1093.  
  1094. Option (b) I assume requires modifying MacApp 2.0 to handle Universal
  1095. headers and having a PowerPC Pascal compiler than can handle MacApp 
  1096. 2.0.  How hard can one estimate modifying MacApp 2.0 to be?  Also has 
  1097. anyone heard whether a PowerPC Pascal compiler will support Pascal 
  1098. Objects and MacApp 2.0?  Is this simply too far fetched an option?
  1099.  
  1100. Option (c) is more well-defined but less appealing to me at least in 
  1101. the time frame being considered.  This is because translation is 
  1102. expected to take one month, upgrading to MacApp 3.0 is expected to take
  1103. another month, MacApp 3.1 might take another week, and by then a lot of
  1104. code has changed, so testing will become a big deal.  This sounds like
  1105. too much work, although I'd like to move to MacApp 3.1 at some point in
  1106. the distant future (well...).
  1107.  
  1108. Anyone willing to rise to this challenge and help me make better
  1109. estimates for option (a), or convince me why option (b) or (c) is
  1110. better?
  1111.  
  1112. - Brian
  1113.  
  1114.  
  1115. +++++++++++++++++++++++++++
  1116.  
  1117. >From d88-jwa@mumrik.nada.kth.se (Jon Wdtte)
  1118. Date: 23 Feb 1994 07:56:03 GMT
  1119. Organization: Royal Institute of Technology, Stockholm, Sweden
  1120.  
  1121. In <QhOdkpW00WBM4A6qlT@andrew.cmu.edu> Brian Patrick Arnold <ba0k+@andrew.cmu.edu> writes:
  1122.  
  1123. >o  App uses MacApp 2.0 with "7.0 for MacApp 2.0" modifications
  1124.  
  1125. Ouch!
  1126.  
  1127. >o  App's user interface is written in MPW Object Pascal 3.2
  1128.  
  1129. Aaaahhh... (now has a serious limp and terrible cut above eyes)
  1130.  
  1131. >o  App's kernel (50% of code) is written in C, with a tiny bit of
  1132. >   C++, with no MacApp/PascalObject dependency (except via
  1133. >   vanilla procedures)
  1134.  
  1135. Oh, that's better (bandages in place)
  1136.  
  1137. >o  App has been tested to run on PowerPC architecture with its
  1138. >   unmodified 68k code
  1139.  
  1140. Well, that doesn't make transition harder nor easier. If you run
  1141. on a 68k Mac, you run on the PowerPC emulation. No surprise there.
  1142.  
  1143. >a. Port the kernel to PowerPC but keep the interface in MC68k
  1144.  
  1145. This is, technically, a bear, since there is no linker currently
  1146. available which can grok 68k and PPC code at the same time.
  1147.  
  1148. >b. Port the kernel and interface code as-is, all for PowerPC
  1149.  
  1150. Hard to do, sincC++ and MacApp 3.1 is needed.
  1151.  
  1152. >c. Translate interface code to C++, upgrade to MacApp 3.0 and then 3.1
  1153.  
  1154. I would suggest re-implementing the interface code in MacApp 3.1
  1155. using whatever cool interface editors/code generators you can get
  1156. your grubby on.
  1157.  
  1158. >The goal being sought is to change as little code as possible in as 
  1159. >little time as possible.  I have a sneaky suspicion that I can get away
  1160.  
  1161. I think my suggestion would actually be the fastest. AND you get a
  1162. good shot at cleaning up your UI, if that's needed.
  1163.  
  1164. -- 
  1165.  -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --
  1166.   "And now, from the makers of EDLIN, comes: Windows NT!"
  1167.  
  1168. +++++++++++++++++++++++++++
  1169.  
  1170. >From zstern@adobe.com (Zalman Stern)
  1171. Date: Thu, 24 Feb 1994 01:51:55 GMT
  1172. Organization: Adobe Systems Incorporated
  1173.  
  1174. Jon W tte writes
  1175. > In <QhOdkpW00WBM4A6qlT@andrew.cmu.edu> Brian Patrick Arnold  
  1176. <ba0k+@andrew.cmu.edu> writes:
  1177. > >a. Port the kernel to PowerPC but keep the interface in MC68k
  1178. > This is, technically, a bear, since there is no linker currently
  1179. > available which can grok 68k and PPC code at the same time.
  1180.  
  1181. Its very easy. Write a PowerPC code fragment which has an entry point that  
  1182. accepts a table of function pointers and returns (a possibly different)  
  1183. table of function pointers. Write jacket functions that call through the  
  1184. table of function pointers on each side. Add initialization code that loads  
  1185. the code fragment and calls it to exchange function tables. If it takes you  
  1186. more than an hour to do this given a list of routine names, you are not an  
  1187. accomplished tools user. (Generating the procinfos for the kernel functions  
  1188. is harder. There's a tool to do it for you, but I doubt its available.)
  1189.  
  1190. This ignores the problem of global variables. If you have lots of them,  
  1191. think of this as an opportunity to improve your code and remove them. You  
  1192. can add pointers to the globals to information that gets exchanged during  
  1193. the initialization handshake. You will have to revise the kernel code to  
  1194. deal with an extra level of indirection on its globals.
  1195.  
  1196. [...]
  1197. > >c. Translate interface code to C++, upgrade to MacApp 3.0 and then 3.1
  1198. > I would suggest re-implementing the interface code in MacApp 3.1
  1199. > using whatever cool interface editors/code generators you can get
  1200. > your grubby on.
  1201. > >The goal being sought is to change as little code as possible in as 
  1202. > >little time as possible.  I have a sneaky suspicion that I can get away
  1203. > I think my suggestion would actually be the fastest. AND you get a
  1204. > good shot at cleaning up your UI, if that's needed.
  1205.  
  1206. Brian's solution is almost certainly faster and less intrusive to the code.  
  1207. (And I have enough direct experience with both MacApp and PowerPC to be very  
  1208. confident in saying that.) The "goodness" of such an approach depends on how  
  1209. well the "kernel" matches the performance cross section of your app. (I.e.  
  1210. does it get you the speed you need.) It also becomes an issue of deferred  
  1211. maintenance. There will be a day when compiling Object Pascal for a 68K is  
  1212. about as easy as compiling Algol 68 for a CDC 6600.
  1213. --
  1214. Zalman Stern           zalman@adobe.com            (415) 962 3824
  1215. Adobe Systems, 1585 Charleston Rd., POB 7900, Mountain View, CA 94039-7900
  1216. "Do right, and risk consequences." Motto of Sam Houston (via Molly Ivins)
  1217.  
  1218. ---------------------------
  1219.  
  1220. >From feats@vtvm1.cc.vt.edu
  1221. Subject: Rules for Using This Newsgroup???
  1222. Date: 20 Feb 1994 09:44:05 -0500
  1223. Organization: Virginia Tech, Blacksburg, VA
  1224.  
  1225.  
  1226. >From: David A Lyons <dlyons@apple.com>
  1227. >Date: Sat, 19 Feb 1994 06:40:14 GMT
  1228. >Organization: Apple Computer, Inc.
  1229. >
  1230. >(Having the right books handy is a very good thing.  You'll save
  1231. >yourself and everybody else a lot of time by getting them and becoming
  1232. >familiar with them.)
  1233. >
  1234. >Dave Lyons, dlyons@apple.com
  1235. >Mr Tangent
  1236.  
  1237.  
  1238. I posed a question to the newsgroup dealing with UpdateEvents and
  1239. Redrawing the contents of a window.  I do not have IM at this time due
  1240. to lack of funds.  I do have Think Reference which has been very helpful
  1241. and I use this Newsgroup as a source of information.  Everyone has been
  1242. very helpful but after this last response I feel like I'm misusing this
  1243. newsgroup!  What exactly are the rules for posting questions on this
  1244. Newsgroup?  Is there a limit to the quantity of questions one person may
  1245. ask or do your questions have to be of a certain complexity?
  1246.  
  1247. I have been using the Macintosh C Programming Primers as a source of
  1248. information and I was interested in finding out more about UpdateEvents.
  1249. The Primer led me to belive that you could redraw the whole window or
  1250. you could keep track of exactly what needed to be updated and only
  1251. redraw that portion of the window.  The examples in the Primers only
  1252. showed redrawing the whole window so I was wondering if others lived
  1253. with that approach or if they used more complex code to speed things
  1254. up!?  I used the BeginUpdate/redraw/EndUpdate logic and it worked; I was
  1255. just trying to make things faster so I asked what others did.
  1256.  
  1257. Should I not ask such trivial questions on this Newsgroup?
  1258.                                                                                 
  1259.                                                                                 
  1260. Stephen L. Greenfield                  Phone:     (703) 231-4025                
  1261. 1700 Pratt Drive - Computing Center    Bitnet:    FEATS@VTVM1                   
  1262. Virginia Polytechnic Institute         Internet:  feats@vtvm1.cc.vt.edu         
  1263. Blacksburg, Virginia  24060-6361 ,/\              feats@feats.cc.vt.edu         
  1264.                                 /   `\/`'\                                      
  1265.                            ,/\/          /                                      
  1266.                          ,/             <_          ._.                         
  1267.                         /                 `\       / /                          
  1268.              ,/\_     _/'                   `-`-\  |/                           
  1269.           ,/'    `_'_'  *  Blacksburg          \_> '                            
  1270.        ,/'                                    \__>_/\                           
  1271.       +----------------------------------------------+                          
  1272.  
  1273. +++++++++++++++++++++++++++
  1274.  
  1275. >From sgl1@kimbark.uchicago.edu (Steven Lane)
  1276. Date: Sun, 20 Feb 1994 17:10:07 GMT
  1277. Organization: University of Chicago
  1278.  
  1279. In article <2k7svl$l1m@vtserf.cc.vt.edu> feats@vtvm1.cc.vt.edu writes:
  1280.  
  1281. >Everyone has been
  1282. >very helpful but after this last response I feel like I'm misusing this
  1283. >newsgroup!  What exactly are the rules for posting questions on this
  1284. >Newsgroup?  Is there a limit to the quantity of questions one person may
  1285. >ask or do your questions have to be of a certain complexity?
  1286.  
  1287. This being the net, there aren't many rules per se. There are
  1288. standards of etiquette; if you transgress these, you will not be
  1289. fined, but you may be gently mocked (or not so gently, depending on
  1290. the offense). In general, when posting questions to a
  1291. technically-oriented group such as this one, the best rule is not to
  1292. ask a question until you've tried to figure out the answer yourself.
  1293. If you didn't read some obvious piece of documentation which answers
  1294. your question, people may be a little grumpy with you. If, on the
  1295. other hand, you don't know which obvious piece of your thousands of pages
  1296. of docs you should read, or you read it and made no sense of it, post
  1297. away. This is a very helpful group, personality-wise -- many rank
  1298. beginners (myself included) post questions and receive speedy and
  1299. thorough answers. At worst, if your question is somehow inappropriate,
  1300. it will just sit by itself in your thread selector, with no responses.
  1301.  
  1302. >I have been using the Macintosh C Programming Primers as a source of
  1303. >information and I was interested in finding out more about UpdateEvents.
  1304. >The Primer led me to belive that you could redraw the whole window or
  1305. >you could keep track of exactly what needed to be updated and only
  1306. >redraw that portion of the window.  The examples in the Primers only
  1307. >showed redrawing the whole window so I was wondering if others lived
  1308. >with that approach or if they used more complex code to speed things
  1309. >up!?  I used the BeginUpdate/redraw/EndUpdate logic and it worked; I was
  1310. >just trying to make things faster so I asked what others did.
  1311.  
  1312. I can't tell whether your question has been answered already; I'll
  1313. pretend it hasn't. It's actually the Window Manager which keeps track
  1314. of which part of the window needs to be refreshed. Look at the
  1315. structure of a WindowRecord and you'll see a field called updateRgn.
  1316. When you use the Begin/EndUpdate sequence, you are warning the Window
  1317. Manager that it should make sure your drawing is clipped so as only to
  1318. go to the updateRgn.
  1319.  
  1320. [ long .sig deleted ]
  1321.  
  1322. You might consider trimming your signature file a little, to save
  1323. bandwidth.
  1324.  
  1325. -- 
  1326. ----
  1327. Steve Lane
  1328. University of Chicago, Department of History
  1329. sgl1@midway.uchicago.edu
  1330.  
  1331. +++++++++++++++++++++++++++
  1332.  
  1333. >From watkeyeh@dunx1.ocs.drexel.edu (Edwin H. Watkeys III)
  1334. Date: Sun, 20 Feb 1994 18:18:41 GMT
  1335. Organization: Drexel University
  1336.  
  1337. In article <1994Feb20.171007.20754@midway.uchicago.edu> sgl1@midway.uchicago.edu writes:
  1338. >In article <2k7svl$l1m@vtserf.cc.vt.edu> feats@vtvm1.cc.vt.edu writes:
  1339. >
  1340. >>[ far too considerate poster's comments deleted. ]
  1341. >
  1342. >This being the net, there aren't many rules per se. There are
  1343. >standards of etiquette; if you transgress these, you will not be
  1344. >fined, but you may be gently mocked (or not so gently, depending on
  1345. >the offense). In general, when posting questions to a
  1346. >technically-oriented group such as this one, the best rule is not to
  1347. >ask a question until you've tried to figure out the answer yourself.
  1348. >If you didn't read some obvious piece of documentation which answers
  1349. >your question, people may be a little grumpy with you. If, on the
  1350. >other hand, you don't know which obvious piece of your thousands of pages
  1351. >of docs you should read, or you read it and made no sense of it, post
  1352. >away. This is a very helpful group, personality-wise -- many rank
  1353. >beginners (myself included) post questions and receive speedy and
  1354. >thorough answers. At worst, if your question is somehow inappropriate,
  1355. >it will just sit by itself in your thread selector, with no responses.
  1356.  
  1357. Isn't that depressing when it happens to one of your posts? It's
  1358. not necessarly because your question is inappropriate: often, there just
  1359. isn't anyone out there at the time who knows much of anything about you
  1360. question. Of course, it could be because everyone thinks you're an
  1361. asshole. I usually assume the former when I see other people's lonely
  1362. posts, but the latter when my posts go unanswered... Oh well...
  1363.  
  1364. You realy need to think before strting a new thread... How are you going
  1365. to appeal to potential readers with your subject line? How will you phrase
  1366. your post, so as to get the right people in a responding mood? You want to
  1367. go for the big names on csmp -- it'll make you feel somehow more worthy...
  1368.  
  1369. Or maybe I need to see a psychologist...
  1370.  
  1371. Ed
  1372. -- 
  1373. Ed Watkeys              watkeyeh@dunx1.ocs.drexel.edu  Drexel University
  1374. Philosopher-Programmer  EdWatkeys@distant.com           Distant Software
  1375.                         - Use finger for my PGP key. -
  1376.  
  1377. +++++++++++++++++++++++++++
  1378.  
  1379. >From d88-jwa@mumrik.nada.kth.se (Jon Wdtte)
  1380. Date: 20 Feb 1994 20:29:43 GMT
  1381. Organization: Royal Institute of Technology, Stockholm, Sweden
  1382.  
  1383. In <CLJC75.32C@Dunx1.OCS.Drexel.Edu> watkeyeh@dunx1.ocs.drexel.edu (Edwin H. Watkeys III) writes:
  1384.  
  1385. >to appeal to potential readers with your subject line? How will you phrase
  1386. >your post, so as to get the right people in a responding mood? You want to
  1387. >go for the big names on csmp -- it'll make you feel somehow more worthy...
  1388.  
  1389. A __BIG__ potential catch here:
  1390.  
  1391. Once a week or so, I get a letter starting:
  1392.  
  1393. "I see you answer a lot of questions on comp.sys.mac.programmer, so
  1394. I figured you could help me with..."
  1395.  
  1396. I usually answer (politely I hope) that I post to the UseNet on my
  1397. spare time (lunch breaks or such) for the potential benefit of all
  1398. UseNet readers, while individual consulting is what I do for a
  1399. living; short contracts are in the $100/hour range.
  1400.  
  1401. In my eye, a question answered on the net is worth 10x as much as
  1402. one answered in a letter, because there are a lot of lurkers who don't
  1403. post much, but read for their education. If, however, the posted
  1404. question is of a simple nature; I usually just mail a reply saying
  1405. that, yes, PBGetCatInfo CAN be your friend, too :-) and then point
  1406. towards the FAQ.
  1407.  
  1408. Cheers,
  1409.  
  1410.                         / h+
  1411. -- 
  1412.  -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --
  1413.  
  1414.   "From now on I will re-label the EQ on the deck as Fizz and Wobble
  1415.    instead of HF and LF."
  1416.  
  1417. +++++++++++++++++++++++++++
  1418.  
  1419. >From peter@ncrpda.curtin.edu.au (Peter N Lewis)
  1420. Date: 21 Feb 1994 11:45:58 +0800
  1421. Organization: NCRPDA, Curtin University
  1422.  
  1423. feats@vtvm1.cc.vt.edu writes:
  1424.  
  1425. >newsgroup!  What exactly are the rules for posting questions on this
  1426. >Newsgroup?  Is there a limit to the quantity of questions one person may
  1427. >ask or do your questions have to be of a certain complexity?
  1428.  
  1429. There are no rules, which just makes it worse really.  Most people wont
  1430. single you out because you've posted too many messages, but they may
  1431. well not answer because of what's in your message.  Things to try to 
  1432. remember:
  1433.  
  1434. First, try to answer the question yourself, if you don't spend at least
  1435. a few hours trying to figure it out first, then you probably wont even
  1436. know the right question to ask.
  1437.  
  1438. Next, make the subject appropriate.  Subjects like "HELP!!!" are useless,
  1439. subjects need to define the problem so that people interested in that
  1440. area, or experts in that area will read your post.
  1441.  
  1442. Then be consise but complete.  Make it clear what you are trying to do
  1443. and why you are failing.  If you have bugs in your code, make sure
  1444. you have found exactly which bit is failing, make sure you are checking
  1445. all the error return values, and produce a simple, short piece of code
  1446. that demonstrates the error.  No one here can (or will) debug your 
  1447. application for you - a code snippet sure, but not your application.
  1448.  
  1449. Offer to take email responses and to summarize them, but also follow
  1450. the thread in news.  Don't say "Email responses, I don't read this group".
  1451. If you don't read the group, then you aren't contributing, so why should
  1452. anyone help you.  If you can't even take the time to read the group for
  1453. a few weeks, forget about posting.  And if you don't normally read the
  1454. group, then check vbery carefully all the articles already there and
  1455. see if your question comes up.  Also, check if it is in the FAQ (usually
  1456. available from rtfm.mit.edu:/pub/usenet).  And do summarize the responses
  1457. if there are more than a few (or if there are any in Email that aren't
  1458. already posted).  Others have the same questions as you do.
  1459.  
  1460. And then put what you learnt back - if someone else posts a question
  1461. that you've had answered, answer it!
  1462.  
  1463. There are only a few reasons that your post wont get any responses:
  1464. 1) No one knows.
  1465. 2) Some people know.
  1466.   2.1) but they didn't see your post (bad subject)
  1467.   2.2) couldn't figure out what your problem was (bad article)
  1468.   2.3) you pissed them off with some comment (insulted someone/something,
  1469.        perhaps had some random religous comment in your sig, whatever).
  1470.   2.4) you sounded like you had no idea what you were talking about
  1471.        (this makes it difficult to answer, since the answer must start
  1472.        from basic principles and go from there which is too tedious).
  1473.  
  1474. Enjoy,
  1475.    Peter.
  1476. -- 
  1477. _______________________________________________________________________
  1478. Peter N Lewis <peter.lewis@info.curtin.edu.au>       Ph: +61 9 368 2055
  1479.  
  1480. +++++++++++++++++++++++++++
  1481.  
  1482. >From ari@world.std.com (Ari I Halberstadt)
  1483. Date: Tue, 22 Feb 1994 06:42:22 GMT
  1484. Organization: The World Public Access UNIX, Brookline, MA
  1485.  
  1486. In article <2k8h7n$hva@news.kth.se>,
  1487. Jon Wdtte <d88-jwa@mumrik.nada.kth.se> wrote:
  1488. >Once a week or so, I get a letter starting:
  1489. >
  1490. >"I see you answer a lot of questions on comp.sys.mac.programmer, so
  1491. >I figured you could help me with..."
  1492.  
  1493. Hi Jon, I see you answer a lot of questions on
  1494. comp.sys.mac.programmer, so I figured you could help me with this
  1495. simple question that's been bugging me for the last 5 minutes. I've
  1496. been trying to figure out precisely how, using only BeginUpdate and
  1497. EndUpdate and 3,500 other assorted Toolbox calls, to solve the mystery
  1498. of Life the Universe and Everything. So far, no obvious solution has
  1499. appeared, but perhaps you've already tackled and solved this problem.
  1500. Forgive me if this is a really obvious thing which is right there in
  1501. the docs, but I couldn't find it anywhere. :-)
  1502. -- 
  1503. Ari Halberstadt    ari@world.std.com     #include <std/disclaimer.h>
  1504. "These beetles were long considered to be very rare because very few
  1505. entomologists look for beetles in the mountains, in winter, at night,
  1506. during snow storms." -- Purves W. K., et al, "Life: The Science of
  1507.  
  1508. ---------------------------
  1509.  
  1510. >From thein@netcom.com (Hla Tun "Tim" Thein)
  1511. Subject: Sending Apple Events from Excel
  1512. Date: Tue, 22 Feb 1994 18:07:40 GMT
  1513. Organization: NETCOM On-line Communication Services (408 241-9760 guest)
  1514.  
  1515. Does anyone know how to send Apple Events from MS Excel to an Apple
  1516. Event Savvy application without writing any code resource?  
  1517.  
  1518. I've looked through the Excel manuals and even the Excel SDK book and
  1519. it seems to suggest that some code resource needs to be written.  If
  1520. that's the case, would anyone have some code resource that they would
  1521. like to share?
  1522.  
  1523. Thanks,
  1524. Tim
  1525.  
  1526. +++++++++++++++++++++++++++
  1527.  
  1528. >From rmah@panix.com (Robert S. Mah)
  1529. Date: Tue, 22 Feb 1994 16:22:57 -0500
  1530. Organization: One Step Beyond
  1531.  
  1532. thein@netcom.com (Hla Tun "Tim" Thein) wrote:
  1533.  
  1534. > Does anyone know how to send Apple Events from MS Excel to an Apple
  1535. > Event Savvy application without writing any code resource?  
  1536. > I've looked through the Excel manuals and even the Excel SDK book and
  1537. > it seems to suggest that some code resource needs to be written.  If
  1538.  
  1539. Just write your code and make sure to name the resource correctly.  It's
  1540. all pretty straitforward -- the only complications come in "linking" the
  1541. external to Excel.
  1542.  
  1543. The one thing about using custom AE's from externals -- don't ask for a
  1544. reply.  The host application probably won't know what to do with it.
  1545.  
  1546. An alternative is to simply use DDE.  Excel supports this and DDE calls
  1547. _can_ receive replies.  The DDE calls are documented in the Macro reference
  1548. (I think).  And since DDE calls simply go out as high level events, your
  1549. other application (if it's yours) can respond without any fuss.
  1550.  
  1551. Another alternative is to use an external scripting system such as Frontier
  1552. or AppleScript.  This is probably the best way, as it will use the OSA
  1553. standard and involve less mucking around inside Excel and speed development
  1554. time.
  1555.  
  1556. However, be careful about using Excel with DDE as the foundation of an
  1557. application.  You should be aware that while Excel is in "edit" mode, it
  1558. cannot receive or send or receive any AppleEvents or DDE "events".  I was
  1559. once on a team that had to rewrite an Excel 4.0 based application because
  1560. of this limitation.  At the time, MS said they had no intention of changing
  1561. this, and that to a customer that bought almost a million dollars of MS
  1562. software every year.  It may be fixed in 4.1 or maybe not -- I haven't
  1563. checked.
  1564.  
  1565. Cheers,
  1566. Rob
  1567. ________________________________________________________________________
  1568.  Robert S. Mah              One Step Beyond              rmah@panix.com
  1569.  
  1570. +++++++++++++++++++++++++++
  1571.  
  1572. >From Steven Ritter <sr0o+@andrew.cmu.edu>
  1573. Date: Wed, 23 Feb 1994 10:40:37 -0500
  1574. Organization: Psychology, Carnegie Mellon, Pittsburgh, PA
  1575.  
  1576. Excerpts from netnews.comp.sys.mac.programmer: 22-Feb-94 Re: Sending
  1577. Apple Events fr.. by Robert S. Mah@panix.com 
  1578. > thein@netcom.com (Hla Tun "Tim" Thein) wrote:
  1579. > > Does anyone know how to send Apple Events from MS Excel to an Apple
  1580. > > Event Savvy application without writing any code resource?  
  1581. > > 
  1582. > > I've looked through the Excel manuals and even the Excel SDK book and
  1583. > > it seems to suggest that some code resource needs to be written.  If
  1584. > Just write your code and make sure to name the resource correctly.  It's
  1585. > all pretty straitforward -- the only complications come in "linking" the
  1586. > external to Excel.
  1587.  
  1588. This isn't much trouble either. If you're not up to writing this
  1589. yourself, ISIS sells a product called S7PX that includes macros to send
  1590. appleevents from Excel -- (818) 788-4747. I wrote a version for myself
  1591. that is more limited than the ISIS one but allows other options that I
  1592. need. If you tell me more specifically what you want to do, I might be
  1593. able to help.
  1594.  
  1595. > The one thing about using custom AE's from externals -- don't ask for a
  1596. > reply.  The host application probably won't know what to do with it.
  1597.  
  1598. I don't have any problem sending and receiving replies (you have to wait
  1599. for a reply, not queue it).
  1600.  
  1601. > However, be careful about using Excel with DDE as the foundation of an
  1602. > application.  You should be aware that while Excel is in "edit" mode, it
  1603. > cannot receive or send or receive any AppleEvents or DDE "events".  
  1604. > I was once on a team that had to rewrite an Excel 4.0 based
  1605. application > because of this limitation.  At the time, MS said they had
  1606. no intention > of changing this, and that to a customer that bought
  1607. almost a million
  1608. > dollars of MS software every year.  It may be fixed in 4.1 or maybe
  1609. not > -- I haven't checked.
  1610.  
  1611. Yes, this is really a big, big hassle. It's not so bad if you're waiting
  1612. for a reply to your appleevent because SendAE will return "appleevent
  1613. not handled". But if you're sending an appleevent that doesn't get a
  1614. reply (like SetData), there is no way to tell whether Excel is listening
  1615. or not. I now confirm SetData with subsequent GetData calls and retry
  1616. the setdata if the result it different.
  1617.  
  1618. On a related tack, there is a send mode parameter called "Want Receipt",
  1619. which is supposed to give the client a "return receipt" if the
  1620. appleevent was received. IM is very vague about what this means ("your
  1621. application receives a return receipt as a high-level event") and I
  1622. haven't been able to figure out how this works (if it does at all). Does
  1623. anyone use this? Would this be a way of telling whether Excel accepted a
  1624. SetData event?
  1625.  
  1626. +++++++++++++++++++++++++++
  1627.  
  1628. >From isis@netcom.com (Mike Cohen)
  1629. Date: Wed, 23 Feb 1994 19:04:36 GMT
  1630. Organization: ISIS International
  1631.  
  1632. rmah@panix.com (Robert S. Mah) writes:
  1633.  
  1634. >thein@netcom.com (Hla Tun "Tim" Thein) wrote:
  1635.  
  1636. >> Does anyone know how to send Apple Events from MS Excel to an Apple
  1637. >> Event Savvy application without writing any code resource?  
  1638. >> 
  1639. >> I've looked through the Excel manuals and even the Excel SDK book and
  1640. >> it seems to suggest that some code resource needs to be written.  If
  1641.  
  1642. My company (ISIS International) sells a product called System 7 Pack for
  1643. Excel which lets you send AppleEvents, run AppleScript or Frontier scripts,
  1644. and launch applications from within Excel macros. A demo is available via
  1645. anonymous ftp on netcom.com in pub/isis/S7PX.demo.hqx.
  1646.  
  1647. Sorry about the commercial post.
  1648. -- 
  1649. Mike Cohen - isis@netcom.com
  1650. NewtonMail: MikeC49506 / ALink: D6734 / AOL: MikeC20
  1651.  
  1652.  
  1653. ---------------------------
  1654.  
  1655. >From Jon Little <little_j@kosmos.wcc.govt.nz>
  1656. Subject: Strange launch erroor
  1657. Date: 21 Feb 1994 22:18:21 GMT
  1658. Organization: Dept. of Comp. Sci., Victoria Uni. of Wellington, New Zealand.
  1659.  
  1660. Hi netters/hackers
  1661.  
  1662. While testing a Think Pascal routine which searches the memory for a
  1663. reqhired application, iff the application isn't in memory then the
  1664. routine tries to launch the application. This is when I get the strange
  1665. error: "Chain and  launch not allowed" in the following code - in the
  1666. line marked {*****************}
  1667.  
  1668.  
  1669.  PROCEDURE LaunchApp (creator: OSType;
  1670.        tofront: boolean);
  1671.   VAR
  1672.    psn: ProcessSerialNumber;
  1673.    targetAddress: AEDesc;
  1674.    theEvent, theReply: AppleEvent;
  1675.    fileList: AEDescList;
  1676.    launchDesc: AEDesc;
  1677.    app_fs: FSSpec;
  1678.    launchThis: LaunchParamBlockRec;
  1679.    oe: OSErr;
  1680.    gv: longInt;
  1681.    sendmode: AESendMode;
  1682.  BEGIN
  1683.   IF (Gestalt(gestaltOSAttr, gv) = noErr) & (BTST(gv,
  1684. gestaltLaunchControl)) THEN BEGIN
  1685.     IF GetPSN(creator, psn) THEN BEGIN
  1686.       IF tofront THEN BEGIN
  1687.        oe := SetFrontProcess(psn);
  1688.        END;
  1689.      END
  1690.     ELSE BEGIN
  1691.       IF MyGetAPPL(creator, app_fs) = noErr THEN BEGIN
  1692.        oe := AECreateDesc(typeApplSignature, @creator, sizeof(creator),
  1693. targetAddress);
  1694.        oe := AECreateAppleEvent(kCoreEventClass, kAEOpenApplication,
  1695. targetAddress, kAutoGenerateReturnID, kAnyTransactionID, theEvent);
  1696.        oe := AEDisposeDesc(targetAddress);
  1697.        launchThis.launchAppSpec := @app_fs;
  1698.        PrepareToLaunch(theEvent, tofront, launchDesc, launchThis);
  1699.        oe := LaunchApplication(@launchThis);   {*****************}
  1700.        oe := AEDisposeDesc(theEvent);
  1701.        END;
  1702.      END;
  1703.    END;
  1704.  END;
  1705.  
  1706. I am unable to find this error documernted anywhere so I would be
  1707. grateful if anyone could tell me how to correct this error
  1708.  
  1709. Thanks in advance
  1710.  
  1711. Jon
  1712.  
  1713. +++++++++++++++++++++++++++
  1714.  
  1715. >From siegel@netcom.com (Rich Siegel)
  1716. Date: Tue, 22 Feb 1994 00:17:47 GMT
  1717. Organization: Bare Bones Software
  1718.  
  1719. In article <2kbbvd$f4l@st-james.comp.vuw.ac.nz> Jon Little <little_j@kosmos.wcc.govt.nz> writes:
  1720. >Hi netters/hackers
  1721. >
  1722. >While testing a Think Pascal routine which searches the memory for a
  1723. >reqhired application, iff the application isn't in memory then the
  1724. >routine tries to launch the application. This is when I get the strange
  1725. >error: "Chain and  launch not allowed" in the following code - in the
  1726. >line marked {*****************}
  1727.  
  1728. THINK Pascal will not allow you to launch other applications from a
  1729. program running within the THINK Pascal debugger. (If memory serves,
  1730. either version 4.0.1 or 4.0.2 relaxes this restriction so that you can
  1731. sub-launch applications under MultiFinder or System 7.)
  1732.  
  1733. R.
  1734.  
  1735. -- 
  1736. Rich Siegel % siegel@netcom.com    % Principal, Bare Bones Software
  1737. --> For information about BBEdit, finger bbedit@world.std.com <--
  1738.  
  1739. "He then proceeded to give a history of the universe, in real time."
  1740.  
  1741. ---------------------------
  1742.  
  1743. >From gneufeld@superior.carleton.ca (Grant Neufeld)
  1744. Subject: TCL- CDLOGDialog [?]
  1745. Date: Mon, 21 Feb 1994 09:08:31 GMT
  1746. Organization: Carleton University
  1747.  
  1748. I am trying to use a DLOG resource to display a dialog using
  1749. Symantec's THINK Class Library (SC++ 6.0.1).
  1750.  
  1751. My problem is that I can't get it to do the automatic recognition of
  1752. the default "OK" button. The dialog comes up and can be dragged (I've
  1753. selected a WDEF with a title bar), but the OK button isn't hilited and
  1754. doesn't do anything when clicked.
  1755.  
  1756. My class CAboutBox subclasses CDLOGDirector.
  1757.  
  1758. /* My initialize procedure */
  1759.  
  1760. void CAboutBox::IAboutBox(CApplication *itsSupervisor) 
  1761. {
  1762.     TRY
  1763.     {
  1764.         inherited::IDLOGDirector(WIND_ABOUT, itsSupervisor);
  1765.         gDecorator->CenterWindow(itsWindow);
  1766.         TalkToUser(); /* display the dialog */
  1767.     }
  1768.     CATCH
  1769.     {
  1770.         Dispose();
  1771.     }
  1772.     ENDTRY;
  1773. }
  1774.  
  1775. /* my display procedure */
  1776.  
  1777. void CAboutBox::TalkToUser()
  1778. {
  1779.     long dismissCommand;
  1780.  
  1781. // The following line gets an "Error: access to 'SetDefaultButton' denied"
  1782. //    (CDialog)itsWindow->CDialog::SetDefaultButton(cmdOK);
  1783.     
  1784.     BeginModalDialog();
  1785.     /* Only one button ("OK", DITL item 1) in my about dialog, */
  1786.     /* so dismissCommand isn't used */
  1787.     dismissCommand = DoModalDialog(cmdOK);
  1788. }
  1789.  
  1790. /* finally, I added the following to my application class's DoCommand */
  1791.  
  1792.     case cmdAbout:
  1793.         theAboutBox = new(CAboutBox);
  1794.         theAboutBox->IAboutBox(this);
  1795.         theAboutBox->Dispose();
  1796.         FlushEvents(mDownMask+mUpMask+keyDownMask+keyUpMask
  1797.                         +autoKeyMask, 0);
  1798.         break;
  1799. -- 
  1800. Grant Neufeld - gneufeld@ccs.carleton.ca - Ottawa, Ontario, Canada
  1801. www http://arpp1.carleton.ca/arpp/Grant/Grant_Neufeld.html
  1802. Apple Research Partnership Program, 1305 Dunton Tower, (613)788-2600ext3537
  1803. My views are too extreme to be anyone else's
  1804.  
  1805. +++++++++++++++++++++++++++
  1806.  
  1807. >From eesau@uta.fi (Esa Ristil{)
  1808. Date: 21 Feb 1994 13:20:59 +0200
  1809. Organization: University of Tampere, Finland
  1810.  
  1811. Did you define command number to the OK button in DITL resource?
  1812. You can do that by adding #1 after OK, so the text in the button
  1813. should be 'OK#1' (without quotes).  This works exactly the way
  1814. menu commands are initialized in the menu resource.  In DITL
  1815. though, you can't put command numbers anywhere else than plain
  1816. buttons, no radiobuttons checkboxes or other things.
  1817.  
  1818. -- 
  1819.                        Esa Ristil{  *  eesau@uta.fi
  1820.                              Homo homini lupus
  1821.  
  1822. +++++++++++++++++++++++++++
  1823.  
  1824. >From d88-jwa@mumrik.nada.kth.se (Jon Wdtte)
  1825. Date: 21 Feb 1994 13:45:38 GMT
  1826. Organization: Royal Institute of Technology, Stockholm, Sweden
  1827.  
  1828. In <gneufeld.761821711@superior> gneufeld@superior.carleton.ca (Grant Neufeld) writes:
  1829.  
  1830. >    /* Only one button ("OK", DITL item 1) in my about dialog, */
  1831.  
  1832. You probably forgot to give the button a command number by
  1833. naming it OK#100
  1834.  
  1835. Cheers,
  1836.  
  1837.                     / h+
  1838. -- 
  1839.  -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --
  1840.   _/~|   Yellow
  1841.  / * \_  Shark                      (This signature has won the "Worst ASCII
  1842.  ~~~~\/  Software                    Logo of the Year" award)
  1843.  
  1844. +++++++++++++++++++++++++++
  1845.  
  1846. >From Steve Bryan <sbryan@maroon.tc.umn.edu>
  1847. Date: Mon, 21 Feb 1994 20:54:58 GMT
  1848. Organization: Sexton Software
  1849.  
  1850. In article <gneufeld.761821711@superior> Grant Neufeld,
  1851. gneufeld@superior.carleton.ca writes:
  1852. >My problem is that I can't get it to do the automatic recognition of
  1853. >the default "OK" button. The dialog comes up and can be dragged (I've
  1854. >selected a WDEF with a title bar), but the OK button isn't hilited and
  1855. >doesn't do anything when clicked.
  1856.  
  1857. There are at least two things you need to do. First use ResEdit to change
  1858. the text of your default button in the dialog to add a command number,
  1859. just like you do for menu items (they share the same parser). I believe
  1860. there is a defined constant that should be used by convention for dialogs
  1861. (found it in Commands.h: #define cmdOK    100L). So if the text of your
  1862. default button was "OK" change it to "OK#100". The other thing you need
  1863. to do is send the message SetDefaultCmd to your dialog director informing
  1864. it that cmdOK is to be your default command. I don't have my projects
  1865. online but that's the idea and it has worked for me.
  1866.  
  1867. -Steve Bryan
  1868.  
  1869. +++++++++++++++++++++++++++
  1870.  
  1871. >From Steve Bryan <sbryan@maroon.tc.umn.edu>
  1872. Date: Mon, 21 Feb 1994 21:55:05 GMT
  1873. Organization: Sexton Software
  1874.  
  1875. In article <2ka5erINNd81@kielo.uta.fi> Esa Ristil{, eesau@uta.fi writes:
  1876. >should be 'OK#1' (without quotes).  This works exactly the way
  1877.  
  1878. That may work but I would use "OK#100" which would associate the button
  1879. with cmdOK. I believe that cmdQuit is asigned to command number 1. The
  1880. other step that might need to be taken is sending the SetDefaultCmd
  1881. message to the dialog director so it knows what command to be the
  1882. default. It draws the outline and handles the default behavior after that.
  1883.  
  1884. -Steve Bryan
  1885.  
  1886. ---------------------------
  1887.  
  1888. >From ctaylor@fox.nstn.ns.ca (Chris Taylor)
  1889. Subject: Time Manager
  1890. Date: 21 Feb 1994 18:07:23 -0400
  1891. Organization: The Party Palace
  1892.  
  1893. I've benn doing some stuff with the extended Time Manager.  I'm using some
  1894. of the sample code from Inside Macintosh VI (chapter 23).  I'm setting it
  1895. up to use the InsXTime proc, and my actual procedure uses the A5 world of
  1896. my app, as well as reactivating itself with a delay of 1000 miliseconds (1
  1897. second).  This seems to conflict with the WaitNextEvent function because
  1898. when I install the task, THINK Pascal stops the program, and tell me that
  1899. there's a bus error in the WaitNextEvent line, then it locks up.  It works
  1900. fine without installing the Time Manager task, and I have no extension
  1901. conflicts.  Also, it's not in my task installation procedure or in the task
  1902. itself (I've checked them all).
  1903.  
  1904. Can someone please help me here?!?!  I need to use the extended time
  1905. manager!
  1906.  
  1907. Please e-mail me if you can help.
  1908.  
  1909. Christian
  1910.  
  1911. +---------------------+----------------------------------+
  1912. |  Christian Taylor   | Internet: ctaylor@fox.nstn.ns.ca |
  1913. |The Party Palace BBS | CIS     : 71442,1161             |
  1914. |   (902) 679-1218    | AOL     : Chris1020              |
  1915. +---------------------+----------------------------------+
  1916.  
  1917. +++++++++++++++++++++++++++
  1918.  
  1919. >From minow@apple.com (Martin Minow)
  1920. Date: Tue, 22 Feb 1994 19:57:32 GMT
  1921. Organization: Macintosh Developer Services
  1922.  
  1923. In article <ctaylor-210294180428@wolfville-ts-14.nstn.ns.ca>,
  1924.  ctaylor@fox.nstn.ns.ca (Chris Taylor) wrote:
  1925. > I've benn doing some stuff with the extended Time Manager.  I'm using some
  1926. > of the sample code from Inside Macintosh VI (chapter 23).  I'm setting it
  1927. > up to use the InsXTime proc, and my actual procedure uses the A5 world of
  1928. > my app, as well as reactivating itself with a delay of 1000 miliseconds (1
  1929. > second).
  1930.  
  1931. Your Time Manager completion routine is called when the time interval
  1932. finishes, and some other process or application may be running..
  1933. Consequently, before installing the task, you must save a copy of your
  1934. application's A5 "somewhere" where the completion routine can access it
  1935. (generally, at a fixed offset from the TMTask. The easist way to do this
  1936. is to create an extended task structure, such as the following:
  1937.  
  1938.     typedef struct {
  1939.         TMTask     tmTask;
  1940.         long       tmApplicationA5;
  1941.     } TMInfoRecord;
  1942.     TMInfoRecord   gTMInfoRecord;
  1943.  
  1944.          gTMInfoRecord.tmTask.FOO = BAR; /* Setup TMTaskRecord */
  1945.          gTMInfoRecord.tmApplicationA5 = SetCurrentA5();
  1946.          InsTime((QElemPtr) &gTMInfoRecord.tmTask);
  1947.          ...
  1948.  
  1949. Your time manager task callback function would look like this:
  1950.  
  1951.     pascal void MyTimeManagerTask(void)
  1952.     {
  1953.          register TMInfoRecord   *tmInfoPtr;
  1954.          long                    oldA5;
  1955.  
  1956.          asm {
  1957.              move.l a1,tmInfoPtr;
  1958.          }
  1959.          oldA5 = SetA5(tmInfoPtr->tmApplicationA5;
  1960.          ... other stuff ...
  1961.          (void) SetA5(oldA5);
  1962.     }
  1963.  
  1964. Note that you cannot call QuickDraw or any function that may move memory
  1965. from your time manager task.
  1966.  
  1967. Hope this helps.
  1968.  
  1969. Martin Minow
  1970. minow@apple.com
  1971. The above does not represent the position of Apple Computer Inc.
  1972.  
  1973. ---------------------------
  1974.  
  1975. >From Dan Crevier <dan@rhino.harvard.edu>
  1976. Subject: Tip for Think C and Radius monitor users
  1977. Date: 21 Feb 1994 01:44:40 -0500
  1978. Organization: Harvard University
  1979.  
  1980.     I've got a radius monitor, and have always been frustrated that
  1981. when using Think C, I can't use the option-click in a window's title
  1982. feature to get a list of the header files because RadiusWare makes it so
  1983. that an option-click in the title zooms the window, and there seemed to be
  1984. no way to turn this "feature" off.
  1985.     Well, playing around with Resorcerer, I found that there is a
  1986. resource type 'RPRM' (with a TMPL resource to match) that has a field
  1987. called "no Option Title zoom", and if you change this to on, then you an
  1988. use the option-click feature in Think C.
  1989.     Just thought I'd mention it in case someone else finds it useful...
  1990.  
  1991. Dan
  1992.  
  1993.  
  1994. ---------------------------
  1995.  
  1996. >From stevej@umcc.umcc.umich.edu (Steve Jovanovic)
  1997. Subject: Universal Headers (A)
  1998. Date: 22 Feb 1994 03:35:54 -0500
  1999. Organization: TopSoft, Inc.
  2000.  
  2001. Hi Netters,
  2002.  
  2003. Recently, someone asked where to find the Universal Headers,
  2004. and the universal QuickTime headers.  The generic MPW
  2005. Universal headers (CIncludes) are available on the _develop_
  2006. #16 CD.  However, they only include the generic headers--
  2007. the System 7.1-specific headers are missing (some of the OSL
  2008. headers, QT, etc.)  The good news, though, is that you can
  2009. find the missing ones on the CodeWarrior DR1 CD!  I was looking
  2010. everywhere for the QuickTime uni's too and finally found them
  2011. on the DR1 CD!  Oddly, they're not in the 68K folder/s, but
  2012. in the PowerPC folder/s.  I can't recall exactly in which 
  2013. directory you'll find them, but if you use the Finder's
  2014. Find... and do a search for "ImageCompression.h" (it'll
  2015. take a while :P ) you'll find them in *that* folder :) as
  2016. well as the Speech Manager uni header, OSA uni's, etc.
  2017.  
  2018. Also, someone else asked about experiences using universal
  2019. headers under TC or SymC++.  That's what we did with FilterTop.
  2020. I just took CIncludes from _develop_ 16 and trashed Symantec's headers.
  2021. For some reason, the Symantec compilers have a problem with
  2022. FixMath.h (specifically, 4 lines).  If you comment them out
  2023. you'll be fine.  (The problem is caused by a conditional
  2024. compilation directive--e-mail me if you need the details).
  2025. It took a couple of days of full-time work to convert
  2026. several dozen K lines of source to compile and work properly
  2027. under the uni headers--there are a bunch of gotchas...but
  2028. it's not hard.  The only real guide that I've come across is
  2029. the "Making the Leap to PowerPC" article in _develop_ #16.
  2030. (It's also available in DocViewer format on the CodeWarrior
  2031. CD).
  2032.  
  2033. This is a bit of an aside, but if you're starting on a new
  2034. project with the uni headers (this is a good rule to follow
  2035. in general regardless of which headers you're using)...when
  2036. you declare struct's, etc. name your data members starting
  2037. with an "f" or something like that...like this:
  2038.  
  2039. typedef struct TopSoft
  2040. {
  2041.     short    fMembers;
  2042.     short    fProducts;
  2043.     char    *fCharacters;
  2044. }
  2045.     *TopSoftPtr, 
  2046.     **TopSoftHdl;
  2047.  
  2048. The reason that might be a good idea is becuase I've
  2049. come across a bunch of non-obvious name conflicts that
  2050. cause MPW C++ to choke (but only w/ uni headers); it's
  2051. important to ensure that you use unique names!  If you
  2052. get obscure "illegal combination of type specifiers"
  2053. errors from MPW C++ (and in those, MPW doesn't give
  2054. line #s!) that might be the cause.
  2055.  
  2056. Anyway, good luck--I hope this helps.
  2057.  
  2058. steve
  2059.  
  2060. +----------------------+---------------------------+----------------------+
  2061. | Steve Jovanovic      |  President, TopSoft, Inc. |    2918 Goold St.    |
  2062. | Marquette University +---------------------------+   Racine, WI 53404   |
  2063. | Computer Engineering | Internet:  stevej@ais.org |    (414) 632-0336    |
  2064. +----------------------+---------------------------+----------------------+
  2065. | "Blue skies above, sun on your arms, strength in your stride, and hope  |
  2066. |  in those squeaky clean eyes..." -- "Teenage Wildlife," David Bowie     |
  2067. +-------------------------------------------------------------------------+
  2068.  
  2069.  
  2070.  
  2071. ---------------------------
  2072.  
  2073. >From adelucia@eden.rutgers.edu (Apple-O)
  2074. Subject: c source code for simple-classic-old mac arcade type games wanted
  2075. Date: 21 Feb 94 08:16:52 GMT
  2076. Organization: Rutgers Univ., New Brunswick, N.J.
  2077.  
  2078. I'm interested in learning how to program games on my mac, using C. 
  2079.  
  2080. Being new to C (and mac) I'm unsure of graphics techniques, functions, etc. 
  2081. as well as sound.
  2082.  
  2083. If anyone has any simple games source code (a plus if well documented), I'd probably be able to learn something from looking at it, & playing around & modifying things.
  2084.  
  2085. Does anyone know any C libraries which include graphics or sound functions?
  2086.  
  2087. -- 
  2088. Apollo
  2089.  
  2090. +++++++++++++++++++++++++++
  2091.  
  2092. >From kenlong@netcom.com (Ken Long)
  2093. Date: Mon, 21 Feb 1994 16:33:04 GMT
  2094. Organization: NETCOM On-line Communication Services (408 241-9760 guest)
  2095.  
  2096. There are a few C game sorces available - from simple to complex.
  2097.  
  2098. The Sprite Animation Toolkit has "Space Invaders" type source, as well as 
  2099. other forms of animation demos.  There's a Pascal source set for 
  2100. "HeartQuest" in the package, too.
  2101.  
  2102. "NewMaxell" has some buggy B/W "game" source, in C.
  2103.  
  2104. On ftp oak.oakland.edu, there's some old C source for a "Go" game.  I'm 
  2105. working on updating this source and will post upon completion.
  2106.  
  2107. The "SpriteWorld" source package has some "game" demo source.
  2108.  
  2109. The Arashi 1.0 and 1.1 source is on Stanford and Univ. Michigan ftps.  
  2110. Full color, direct to screen, graphics, animation, sound, sound 
  2111. compression, etc.
  2112.  
  2113. "Cheese Toast" is a Malestrom-type game source package.  FPU required for 
  2114. the built application.
  2115.  
  2116. I ordered and received the source for "MacMan" (the B/W version) and the 
  2117. source may still be available. ($15)
  2118.  
  2119. There's some Tetris-type sources available.
  2120.  
  2121. There is a source project called "Hearts" - a card game - available from 
  2122. the authors.
  2123.  
  2124. Here, on Netcom, there are some ANSI game sources. Poker, tetris, 
  2125. Monopoly, Snake and others.  Not much help for a beginner, since they are 
  2126. not "Mac-like" or even for Think C, but game source, none the less.
  2127.  
  2128. Then, you can write to authors and ask for source.  I've gotten several 
  2129. sources - some of which I'm not allowed (nor would I) to distribute - from 
  2130. authors upon request.  They rule of thumb is:  When you see a program you 
  2131. want the source for, ASK immediately.  I've gotten some publically 
  2132. available source, even at a price, only to find other's later attemps to 
  2133. get the same source failed due to authors changing their mind about 
  2134. releasing it.
  2135.  
  2136. One of the best game source projects I got was from an author who had not 
  2137. released anything since 1985.  No addresses in his program were current.  
  2138. So, with a little detective work, and some 555-1212 calls, I was able to 
  2139. contact him.  A Mac to Mac telecom connection transmitted the source.
  2140.  
  2141. Also, you may be able to get source for games authors have given up on.  
  2142. They may no longer have the time or willingness to complete the 
  2143. development of some project.  You can work deals to complete the 
  2144. development of such projects.  I was given source on that basis.  But, 
  2145. upon reviewing the source, I could see that a complete rewrite, using 
  2146. modern methods, would have been the best course of action.  As such, the 
  2147. old code only had historical value, or training value.  And, since the 
  2148. original game was started, several competitive games have already been 
  2149. released by others, making it an unfeasable shareware proposition.  This 
  2150. may not always be the case, though.
  2151.  
  2152. Ken
  2153.  
  2154. kenlong@netcom.com
  2155.  
  2156. "It's better to have a Mac and not need it, than to need a Mac and not 
  2157. have it."
  2158.  
  2159.  
  2160. ---------------------------
  2161.  
  2162. >From todd_J._Lipcon@fourd.com (todd J. Lipcon)
  2163. Subject: showtext-pascal
  2164. Date: 20 Feb 1994 11:29:14 -0600
  2165. Organization: 4th Dimension BBS
  2166.  
  2167. Is there a very easy way to save the contents of THINK Pascal's built-in Text
  2168. window to a teachtext file?  I really don't want to have to figure out the
  2169. entire TE manager!  The program generates a series of prime numbers and right
  2170. now it puts them into the text window using writeln().  If I cant do what I
  2171. want, does anyone have any simlpe TE routines?
  2172.                                                                                                 Thanks for the help!
  2173.                                         Scott Lipcon
  2174. reply to: Scott.Lipcon@zorro9.fidonet.org, or Scott@fourd.com
  2175.  
  2176. ********************************************************************
  2177. System: fourd.com                                Phone: 617-494-0565
  2178. Cute quote:  Being a computer means never having to say you're sorry
  2179. ********************************************************************
  2180.  
  2181. +++++++++++++++++++++++++++
  2182.  
  2183. >From robertl@netcom.com (Robert L Mathews)
  2184. Date: Mon, 21 Feb 1994 11:32:46 GMT
  2185. Organization: Tiger Technologies
  2186.  
  2187. todd J. Lipcon (todd_J._Lipcon@fourd.com) wrote:
  2188. : Is there a very easy way to save the contents of THINK Pascal's built-in Text
  2189. : window to a teachtext file?  I really don't want to have to figure out the
  2190. : entire TE manager!  The program generates a series of prime numbers and right
  2191. : now it puts them into the text window using writeln().  If I cant do what I
  2192. : want, does anyone have any simlpe TE routines?
  2193.  
  2194. You're under a misapprehension here: TextEdit has nothing to do whatsoever
  2195. with TeachText files (not from the point of view of a program that wants
  2196. to create them, anyway). TextEdit is what TeachText uses internally to
  2197. display your file, but all your file needs to contain is a series of
  2198. characters.
  2199.  
  2200. This being the case, simply do the following:
  2201.  
  2202. o  Create a new file (data fork) on the disk of type 'TEXT', creator 'ttxt'.
  2203.    Use a toolbox call such as FSpCreate or HCreate, depending on whether
  2204.    the System 7-only FSSpec calls are available.
  2205.  
  2206. o  Open the file using FSpOpenDF or HOpen.
  2207.  
  2208. o  Use FSWrite to write the text to the file. Do this for each line you
  2209.    want in the file, writing a carriage return (or two) wherever you want
  2210.    to have carriage returns.
  2211.  
  2212. o  Use FSClose when you're finished.
  2213.  
  2214. This should get you going - if this is going into a real program, you'll
  2215. want to be sure to check for errors and allow the user to name and choose
  2216. the location of the file, using StandardPutFile or one of its more complicated
  2217. ancestors or cousins.
  2218.  
  2219. --
  2220. Robert L Mathews, Tiger Technologies
  2221.  
  2222. +++++++++++++++++++++++++++
  2223.  
  2224. >From reinkeha@dunx1.ocs.drexel.edu (Harry A. Reinke)
  2225. Date: Mon, 21 Feb 1994 14:50:18 GMT
  2226. Organization: Drexel University, Phila. Pa.
  2227.  
  2228. My only suggestion is that you use two procedures, one for text output,
  2229. and another to a file.  If you need code for how to output to a file I can
  2230. help you there as well.
  2231.  
  2232. If you want to look into it on your own ... look at
  2233. FSWRITE,FSREAD,STANDARDPUTFILE.
  2234.  
  2235. Bye.
  2236.  
  2237.  
  2238. +++++++++++++++++++++++++++
  2239.  
  2240. >From bn9606@beorn (Brian Novack)
  2241. Date: 21 Feb 94 17:09:24 GMT
  2242. Organization: WU-Wien
  2243.  
  2244. In article <131305467.29614446@fourd.fourd.com> from [20 Feb 94 17:29:14 GMT] you wrote:
  2245.  |> Is there a very easy way to save the contents of THINK Pascal's built-in Text
  2246.  |> window to a teachtext file?  I really don't want to have to figure out the
  2247.  |> entire TE manager!  The program generates a series of prime numbers and right
  2248.  |> now it puts them into the text window using writeln().  If I cant do what I
  2249.  |> want, does anyone have any simlpe TE routines?
  2250.  |>                                                                                                 Thanks for the help!
  2251.  |>                                         Scott Lipcon
  2252.  |> reply to: Scott.Lipcon@zorro9.fidonet.org, or Scott@fourd.com
  2253.  |> 
  2254.  |> ********************************************************************
  2255.  |> System: fourd.com                                Phone: 617-494-0565
  2256.  |> Cute quote:  Being a computer means never having to say you're sorry
  2257.  |> ********************************************************************
  2258.  
  2259. Under the Run Options, you can tell it to save the text window to a file, and adjust the
  2260. buffer size of the window as well (how many characters it will hold).
  2261.  
  2262. ---Brian Novack
  2263.  
  2264.  
  2265. +++++++++++++++++++++++++++
  2266.  
  2267. >From peter@ncrpda.curtin.edu.au (Peter N Lewis)
  2268. Date: 22 Feb 1994 12:37:59 +0800
  2269. Organization: NCRPDA, Curtin University
  2270.  
  2271. todd_J._Lipcon@fourd.com (todd J. Lipcon) writes:
  2272.  
  2273. >Is there a very easy way to save the contents of THINK Pascal's built-in Text
  2274. >window to a teachtext file?  I really don't want to have to figure out the
  2275.  
  2276. Well, choose Save as... works for me.  I think it requires at least TP 4,
  2277. maybe even 4.0.2.  But it works fine, saves the text window to a TeachText
  2278. document.
  2279.    Peter.
  2280. -- 
  2281. _______________________________________________________________________
  2282. Peter N Lewis <peter.lewis@info.curtin.edu.au>       Ph: +61 9 368 2055
  2283.  
  2284. ---------------------------
  2285.  
  2286. End of C.S.M.P. Digest
  2287. **********************
  2288.  
  2289.  
  2290.  
  2291.